This guide covers two methods to block IP addresses and control access to your HOSTDOG-hosted website: using the IP Blocker tool in your control panel, and writing manual .htaccess rules for more advanced scenarios such as allowing only specific IPs or blocking entire ranges.
Prerequisites
- An active HOSTDOG hosting account
- Access to your hosting control panel
- The IP address(es) you want to block — check your access logs or error logs to identify them
When to block IPs
Common reasons to block IP addresses include:
- Brute-force login attempts: Repeated failed login attempts from the same IP targeting your CMS admin panel or webmail
- Spam and comment abuse: Bots or individuals posting spam on your website
- Scraping: Bots aggressively copying your website content
- Known malicious IPs: Addresses flagged in your server logs or by Imunify360
- Geographic restrictions: Blocking entire IP ranges from regions that generate only spam traffic for your site
Method 1: IP Blocker in the control panel
The IP Blocker tool provides a simple interface for blocking individual IPs, IP ranges, or CIDR blocks.
Navigate to the HOSTDOG homepage and click the Log in button in the top right corner. Once in the Client Area, go to Services, select your hosting plan, and click Log in to Control Panel.
In your control panel, find the Security section and click IP Blocker.
In the Add an IP or Range field, enter the IP address you want to block. You can use several formats:
| Format | Example | What it blocks |
|---|---|---|
| Single IP | 192.168.1.100 |
One specific IP address |
| IP range | 192.168.1.100-192.168.1.200 |
All IPs in the range |
| CIDR notation | 192.168.1.0/24 |
All 256 IPs in the subnet |
Click Add to apply the block. The IP is denied access immediately.
Below the input field, the Currently Blocked IP Addresses list shows all IPs you have blocked. To remove a block, click Delete next to the IP address.
Method 2: Using .htaccess rules
For more advanced access control — such as allowing only specific IPs or blocking access to certain directories — you can edit the .htaccess file in your website's root directory.
Block specific IPs
<RequireAll>
Require all granted
Require not ip 192.168.1.100
Require not ip 10.0.0.0/8
</RequireAll>
Allow only specific IPs (whitelist)
<RequireAny>
Require ip 203.0.113.50
Require ip 198.51.100.0/24
</RequireAny>
This is useful for restricting access to a staging site or admin area to your office or home IP only.
Block access to a specific file
<Files "wp-login.php">
<RequireAll>
Require all granted
Require not ip 192.168.1.100
</RequireAll>
</Files>
Find your visitor's IP address
To identify which IP to block, check your server's access logs or error logs. In your control panel, go to Metrics → Raw Access to download your access logs. Look for patterns of repeated requests from the same IP address, particularly to login pages or admin URLs.
You can also check the Imunify360 dashboard in your control panel — it logs detected threats along with the source IP addresses.
Frequently asked questions
If you can no longer access your control panel or website, contact HOSTDOG support. Our team can remove the block for you. To prevent this, note your current IP address before making changes — you can find it by searching "what is my IP" in any search engine.
Manual IP blocking is effective against targeted abuse from specific IPs but is not designed to mitigate large-scale DDoS attacks, which use thousands of different IPs. For DDoS protection, HOSTDOG's server-level infrastructure handles traffic filtering. Contact support if you suspect a DDoS attack.
There is no hard limit, but maintaining a very large blocklist (thousands of entries) can slightly impact performance. For broad blocking, use CIDR ranges instead of individual IPs. If you need to block large numbers of IPs, contact support to discuss server-level solutions.