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
Good to know: Imunify360 and ModSecurity WAF already block many malicious IPs automatically. Manual IP blocking is useful for threats that are specific to your website or that automated systems have not yet detected.

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.

Step 1:
Log in to your control panel

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.

Step 2:
Open IP Blocker

In your control panel, find the Security section and click IP Blocker.

Step 3:
Add an IP to block

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.

Step 4:
Manage blocked IPs

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.

Important: Be careful not to block your own IP address. If you accidentally lock yourself out, contact HOSTDOG support to have the block removed.

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>
Tip: If you use a dynamic IP address (common with most home internet connections), be cautious with IP whitelisting. Your IP may change, locking you out. Consider using directory password protection as an alternative.

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 MetricsRaw 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

I accidentally blocked my own IP. What do I do?

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.

Need Help? If you need assistance blocking malicious traffic or setting up access restrictions, our support team is available 24/7. Navigate to the HOSTDOG homepage and click the Log in button to open a support ticket and we'll assist you promptly.