Blocking Visitors
Updated 2 July 2026
Sometimes you need to block abusive IPs, countries, or bots from reaching your site.
This article explains common visitor-blocking methods and what to watch for so you do not block legitimate traffic by mistake.
Options
- Hosting firewall: block IPs in cPanel or your host's security panel.
- Cloudflare: firewall rules, rate limiting, and bot fight mode.
- WordPress plugins: security plugins with IP deny lists.
- .htaccess:
Deny from 1.2.3.4for Apache servers.
Be careful not to block your own IP or legitimate crawlers like Googlebot if you rely on search traffic.