---
title: "Blocking a specific IP address in Drupal 7"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/drupal/blocking-a-specific-ip-address-in-drupal/
date: 2012-02-17
modified: 2021-08-16
author: "Carrie Smaha"
categories: ["Drupal"]
type: post
lang: en
---

# 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](/support/edu/drupal/how-to-log-into-the-drupal-admin-dashboard/)
2. Go to **Configuration**
3. Click **IP address blocking**, located under the **People** category. [![drupal_ban_ip_1](https://www.inmotionhosting.com/support/wp-content/uploads/2012/02/drupal_drupal_ban_ip_1-1024x328.jpg)](/support/wp-content/uploads/2012/02/drupal_drupal_ban_ip_1.jpg)
4. Type in the **IP address to block** and click **Add**.[![drupal_ban_ip_2](https://www.inmotionhosting.com/support/wp-content/uploads/2012/02/drupal_drupal_ban_ip_2.jpg)](/support/wp-content/uploads/2012/02/drupal_drupal_ban_ip_2.jpg)
5. Now, when a visitor with that IP address visits your website, they will see the message “**Sorry, 141.0.10.182 has been banned.**” If you need to at a later time, you can also [unblock IP addresses](/support/edu/drupal/how-to-unblock-an-ip-in-drupal/).

For more step-by-step guides and practical tips, visit our [Drupal Education Channel](https://www.inmotionhosting.com/support/edu/drupal/).
