How to block an IP address Print

  • 0

If a particular IP address is spamming your contact form, trying to break into your site or scraping your content, you can block it from your website.

Find the IP address

You can often find the address in your website's logs or in a security plugin. In cPanel, Metrics → Visitors shows recent visits with their IP addresses.

Block it

  1. In cPanel, open Security → IP Blocker.
  2. Under IP Address or Domain, enter the address or range.
  3. Click Add.

Blocking an IP address with IP Blocker

Formats you can use

One address198.51.100.23
A range198.51.100.1-198.51.100.40
CIDR block198.51.100.0/24

Unblock

Scroll down to Currently-Blocked IP Addresses and click Delete next to the entry.

Good to know: IP Blocker blocks access to your website. It doesn't block email. Attackers often change IP addresses, so for ongoing attacks on a WordPress site, a security plugin with login protection works better.
Be careful not to block your own IP address. If your website suddenly stops loading for you but works on mobile data, check this list.

Was this answer helpful?

« Back