Answer :
Blocking IP addresses can help protect your website from spam, brute-force attacks, malicious bots, or unwanted traffic. GHFS Hosting allows you to block IP addresses easily using Plesk or additional security tools.
This article explains all available methods.
1. Method 1: Block IPs Using Plesk “IP Address Access Restrictions”
Plesk provides a built-in feature to block IPs from accessing your website.
Steps:
-
Log in to your Plesk control panel
-
Go to Websites & Domains
-
Select your domain
-
Click IP Address Access Restrictions (or Hosting Settings → Access Control, depending on Plesk version)
-
Add the IP address or range you want to block
-
Choose Deny
-
Save changes
The blocked IP will no longer be able to access your site.
2. Method 2: Block IPs Using .htaccess (Apache Users)
If your site uses Apache, you can manually block IPs via .htaccess.
Add the following lines:
Replace the example IPs with the ones you want to block.
This method works for single IPs and IP ranges.
3. Method 3: Block IPs with nginx (Custom Rules)
If your domain uses nginx rules, block IPs using additional directives.
In Plesk:
-
Go to Websites & Domains
-
Click Apache & nginx Settings
-
Scroll to Additional nginx directives
-
Add:
-
Save the changes
4. Method 4: Block IPs Using WordPress Security Plugins (Optional)
If you are running WordPress, several security plugins allow IP blocking:
-
Wordfence
-
Sucuri Security
-
iThemes Security
These tools provide:
-
Automatic bot blocking
-
Rate limiting
-
Brute-force attack protection
-
Country blocking (in premium versions)
Good for users who want more advanced control.
5. Method 5: Use Fail2Ban (Server-Level, for VPS Customers)
If you have a VPS hosting plan, Fail2Ban can block IPs automatically for:
-
Login attempts
-
XML-RPC attacks
-
SSH brute-force
-
Mail server abuse
GHFS Hosting support can help enable Fail2Ban filters if needed.
6. Best Practices for IP Blocking
-
Block only necessary IPs to avoid blocking legitimate users
-
Use CIDR ranges for large attack patterns
-
Combine IP blocking with firewall rules
-
Use rate limiting for repeated requests
-
Enable security features in WordPress Toolkit
7. When to Contact GHFS Hosting Support
Contact support if:
-
You are unsure which method applies to your hosting plan
-
The blocked IP is still accessing your site
-
You suspect high-level attacks
-
You need help implementing firewall or Fail2Ban rules
Support can apply IP blocks at the server level if required.