Search Our Database

How to Block an IP from Accessing Your Website in cPanel

Last updated on |
by

Introduction

Blocking specific IP addresses is an essential security measure for protecting your website from malicious traffic, spam bots, or repeated unauthorized access attempts. cPanel’s IP Blocker provides a straightforward interface for restricting access based on IP addresses or ranges, helping maintain site security and reduce unwanted traffic. This guide explains how to block IP addresses using the Security > IP Blocker section in cPanel, enabling you to control access to your server and protect against targeted attacks or persistent security threats.

Prerequisites

  • Access to your cPanel with user privileges.
  • The IP address(es) you wish to block.

 

Step-by-step Guide

Step 1: Log in to cPanel

Access and log in to your cPanel account using your username and password.

 

Step 2: Access IP Blocker

Under the Security section, click IP Blocker. You will see a feature to add IP addresses and the list of currently-blocked IP addresses.

 

Step 3: Enter the IP Address or IP Range

In the IP Address or Domain field, enter the address or range you want to block. You can use several formats:

  • Single IP Address: 10.5.3.33
  • IP Range: 10.5.3.3-10.5.3.40 or 10.5.3.3-40
  • CIDR Format (Recommended): 10.5.3.3/32 (for a single IP)
  • Implied IP: 10.

Then, click Add.

Note: The implied format (e.g., 10. ) represents 10.*.*.* and will block access to any address that begins with those numbers. Use this with extreme caution, as you could accidentally block large, legitimate networks.

 

Step 4: Verify the Changes

You may confirm that the address or range you entered is now present in the Currently-Blocked IP Addresses list, displayed in CIDR format with the beginning and ending IP.

 

Conclusion

Blocking IP addresses through cPanel’s IP Blocker is an effective security measure for protecting your website from unwanted traffic and malicious access attempts. By properly configuring IP blocks using appropriate formats, you can maintain server security while ensuring legitimate users retain access to your services.

Should you have any inquiries about the guidelines, please feel free to open a ticket through your portal account or contact us at support@ipserverone.com. We’ll be happy to assist you further.