Security & Firewall

How do I block a specific IP address?

If a particular IP address is abusing your site, for example spamming a form, scraping content, or hammering your login, you can block it so it can no longer connect.

Block at the site level (.htaccess). This is the quickest self-service method for a single site. Add these lines to the .htaccess file in your site's root folder:

<RequireAll>
  Require all granted
  Require not ip 203.0.113.45
</RequireAll>

Replace 203.0.113.45 with the address you want to block. You can add more Require not ip lines, or block a whole range.

Block via the control panel. Log in to DirhamHost from my.dirhamaday.ae and use the IP Blocker tool to enter an address or range; it applies the block for your account.

To find the offending IP, check your site's access or error logs in the panel, or your form/plugin's logs, to identify which address is causing trouble.

For a persistent or large-scale attack that you want blocked at the server firewall (CSF) level, or to block by country, contact our 24/7 team on WhatsApp +971 58 553 6767 or support@dirhamaday.ae with the IP details and we will handle it.

Still need a hand? Our UAE-based team is here 24/7.

Related articles

What firewall protects my hosting?How does brute-force protection work?Is my website scanned for malware?What is the ModSecurity web application firewall?How do I enable two-factor authentication?