Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Fix "The Webmaster Has Forbidden Your Access to This Site" Error

6 min read
01.06.2025

1. Check If Your IP is Blocked

The website may have blocked your IP address using .htaccess, a firewall, or a security plugin.

The Webmaster Has Forbidden Your Access
"Forbidden" — IP blocked, .htaccess deny, or WAF rule fired.

For other access-restriction errors, see BlacklistAlert — Understanding and Resolving and "421 Home Directory Not Available — Aborting" Error.

Find Your Public IP Address

Check Your Current IP Address

# Using curl
curl -s ifconfig.me

# Using wget
wget -qO- ifconfig.me

# Using dig (shows DNS resolver IP)
dig +short myip.opendns.com @resolver1.opendns.com

You can also check your IP at https://whatismyipaddress.com/.

Check .htaccess for IP Blocks

Examine .htaccess File

sudo nano /home/user/public_html/.htaccess

Look for lines that block specific IP addresses:

# Apache 2.2 syntax
Deny from 192.168.1.100
Deny from 123.45.67.89

# Apache 2.4 syntax
Require not ip 192.168.1.100
Require not ip 123.45.67.89

If your IP appears in these lines, remove it or comment it out:

# Deny from 192.168.1.100  # Commented out
# Require not ip 192.168.1.100

Check Server Firewall Rules

Check iptables (Linux Firewall)

# List all iptables rules
sudo iptables -L -n

# Search for your IP
sudo iptables -L -n | grep YOUR.IP.ADDRESS

# If blocked, remove the rule
sudo iptables -D INPUT -s YOUR.IP.ADDRESS -j DROP

# Save iptables rules (Ubuntu/Debian)
sudo iptables-save > /etc/iptables/rules.v4

Check CSF Firewall (cPanel Servers)

# Check if IP is blocked in CSF
sudo csf -g YOUR.IP.ADDRESS

# Remove IP from deny list
sudo csf -dr YOUR.IP.ADDRESS

# Reload CSF rules
sudo csf -r

# Check temporary blocks
sudo csf -t

After making changes, try accessing the site again.

2. Check .htaccess Rules for Website Restrictions

A misconfigured .htaccess file can deny access to all users or specific user agents.

Open and Examine .htaccess

sudo nano /home/user/public_html/.htaccess

Look for Restrictive Rules

Common Blocking Rules to Check

# Apache 2.2 - Denies all access
Order Deny,Allow
Deny from all

# Apache 2.4 - Denies all access
Require all denied

# Blocks based on user agent
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (badbot|evilbot|scraper) [NC]
RewriteRule .* - [F,L]

# Blocks based on referrer
RewriteCond %{HTTP_REFERER} spamdomain\.com [NC]
RewriteRule .* - [F,L]

# Blocks based on IP range
Deny from 192.168.0.0/16
Require not ip 10.0.0.0/8

Temporarily rename the .htaccess file to test if it's causing the issue:

sudo mv /home/user/public_html/.htaccess /home/user/public_html/.htaccess_backup

Then try accessing the site. If it works, the problem is in your .htaccess file.

Restart Web Server After Changes

# For Apache
sudo systemctl restart apache2

# For Nginx
sudo systemctl restart nginx
Linux Hosting
Reliable and fast web hosting!
  • Free domain
  • Modern servers
  • NVMe disks
  • 7-day free trial
Linux Hosting

3. Disable Security Plugins (If WordPress or Joomla)

Security plugins (like Wordfence, Sucuri, iThemes Security, All In One WP Security) can block access based on various criteria.

Disable WordPress Plugins via SSH

Temporarily Disable Security Plugins

# Rename the plugin folder (disables it)
sudo mv /home/user/public_html/wp-content/plugins/wordfence /home/user/public_html/wp-content/plugins/wordfence_disabled

# For multiple security plugins
sudo mv /home/user/public_html/wp-content/plugins/sucuri-scanner /home/user/public_html/wp-content/plugins/sucuri-scanner_disabled
sudo mv /home/user/public_html/wp-content/plugins/better-wp-security /home/user/public_html/wp-content/plugins/better-wp-security_disabled
sudo mv /home/user/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall /home/user/public_html/wp-content/plugins/all-in-one-wp-security_disabled

Disable via Database (If SSH Access Not Available)

-- Run in phpMyAdmin or MySQL command line
UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';
Database Warning: Only use this method if you're comfortable with SQL. This deactivates ALL plugins, not just security ones.

Check Plugin Configuration Files

Some plugins create configuration files that might block access:

# Wordfence configuration
sudo ls -la /home/user/public_html/wp-content/wflogs/

# Check for blocked IPs
sudo cat /home/user/public_html/wp-content/wflogs/config.php 2>/dev/null | grep block

After disabling plugins, try accessing the site again. If it works, reconfigure the security plugin with less restrictive settings.

4. Check Server Configuration (Apache/Nginx)

If the issue persists, check the main server configuration files.

Apache Configuration

Check Apache Main Configuration

# Ubuntu/Debian
sudo nano /etc/apache2/apache2.conf
sudo nano /etc/apache2/sites-available/000-default.conf

# CentOS/RHEL/Fedora
sudo nano /etc/httpd/conf/httpd.conf
sudo nano /etc/httpd/conf.d/*.conf

Ensure the directory configuration allows access:

# Apache 2.4 syntax (should look like this)
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Nginx Configuration

Check Nginx Configuration

# Main configuration
sudo nano /etc/nginx/nginx.conf

# Site-specific configuration
sudo nano /etc/nginx/sites-available/default
sudo nano /etc/nginx/conf.d/*.conf

Look for deny directives:

# Blocks all access
deny all;

# Blocks specific IPs
deny 192.168.1.100;

# Location block that might be restrictive
location /admin/ {
    deny all;
}

Restart Web Services

# For Apache
sudo systemctl restart apache2
sudo apache2ctl configtest  # Test configuration first

# For Nginx
sudo nginx -t  # Test configuration first
sudo systemctl restart nginx

5. Other Solutions to Try

If the above steps don't work, try these additional approaches:

Try a Different Network Connection

  • Use a different device (phone, tablet, another computer)
  • Switch to mobile data (4G/5G) instead of Wi-Fi
  • Use a VPN service to change your IP address
  • Ask a friend in a different location to try accessing the site

Browser-Specific Solutions

  • Clear cache and cookies: Ctrl+Shift+Delete (Chrome/Firefox)
  • Try incognito/private mode: Ctrl+Shift+N (Chrome), Ctrl+Shift+P (Firefox)
  • Try a different browser: Firefox, Chrome, Edge, Safari
  • Disable browser extensions: Some security extensions might interfere

Check for DNS or CDN Issues

  • If using Cloudflare, check security settings in the dashboard
  • Try accessing via IP address instead of domain name
  • Check DNS propagation with tools like DNS Checker
  • Flush DNS cache: ipconfig /flushdns (Windows) or sudo systemd-resolve --flush-caches (Linux)

6. Summary of Fixes

Issue Fix Where to Check
IP Blocked Remove from .htaccess, Firewall (iptables, CSF) .htaccess, csf -g IP, iptables -L
Restrictive .htaccess rules Remove Deny from all or Require all denied /home/user/public_html/.htaccess
Security Plugin Block Disable Wordfence, Sucuri, iThemes Security wp-content/plugins/ directory
Server Configuration Check apache2.conf or nginx.conf /etc/apache2/ or /etc/nginx/
Cloudflare/ CDN Block Check security settings in CDN dashboard Cloudflare Dashboard > Security
Browser Issues Clear cache, try incognito, disable extensions Browser settings
Network Issues Try VPN, mobile data, different network Network configuration

By systematically checking each potential cause, you should be able to identify and fix the "webmaster has forbidden your access" error and restore access to the website!

Frequently asked questions
Check the response page source for hints ("ModSecurity", "Imunify360", "BitNinja", "Sucuri"). Then your server logs: Apache access_log for the IP at the timestamp, modsec_audit_log if ModSecurity is involved, /var/log/csf.log for CSF blocks, cphulkd logs in WHM. The block is logged somewhere — find which log mentions the visitor's IP.
Generally no, that's the point. You can ask the site owner via a different communication channel (email if you know one) to whitelist your IP. Other things to try: different ISP IP (mobile network), VPN, or wait — many blocks expire (cphulkd typically 4 hours, fail2ban often 24 hours).
cphulkd locked them out after repeated wrong password attempts. WHM → cPHulk Brute Force Protection → History — find the IP and remove the lockout. Also whitelist your own static IP under "Allowed IP List" to prevent it happening again.
`grep -r 'Deny from\|Require' /home/*/public_html/` — finds all access-control directives across user accounts. For specific IP: `grep -r '' /home/*/public_html/.htaccess` — pinpoints which site has the deny rule. CMS plugins (Wordfence, iThemes) sometimes write deny rules to .htaccess too.
Related articles
Fixing "Internal Server Error" (500) in Apache/Nginx
Using method 'mysql_native_password' failed with message: access denied for user
Bandwidth Limit Exceeded: Causes and Solutions