Blocking a specific IP address in Drupal 7

You may find it necessary to block a specific IP address from accessing your Drupal 7 website. Perhaps they are a spammer or have been attempting to break into the site to vandalize it. This can be done very quickly through your Drupal 7 admin dashboard.

  1. Log into your Drupal 7 Dashboard
  2. Go to Configuration
  3. Click IP address blocking, located under the People category.
  4. Type in the IP address to block and click Add.drupal_ban_ip_2
  5. Now, when a visitor with that IP address visits your website, they will see the message “Sorry, has been banned.

    If you need to at a later time, you can also unblock IP addresses.

If you need further assistance please feel free to ask a question on our support center.

Carrie Smaha Senior Manager Marketing Operations

Carrie enjoys working on demand generation and product marketing projects that tap into multi-touch campaign design, technical SEO, content marketing, software design, and business operations.

More Articles by Carrie

Was this article helpful? Let us know!