How to block IPs with .htaccess

    October 16, 2019

    How to block IPs specific to various countries from accessing your site.


    • If you do not have experience in dealing with .htaccess files, we highly recommend that you contact our 24/7 support team for assistance. An improperly handled .htaccess file can cause major problems for your website.
    • Always back up your .htaccess file before making changes to it.

    How to block malicious IPs

    Within your .htaccess file, either locate the "allow from" list, or create one if necessary. Follow the outline below to add IP addresses:

    Order allow,deny
    deny from
    deny from
    deny from
    allow from all

    These block lists are convenient for blocking countries or areas known for fraudulent orders or traffic-increasing automated bots.   

    For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.

    Was this article helpful?

    Send feedback

    Can’t find what you’re looking for?

    Our award-winning customer care team is here for you.

    Contact Support