How to block or trust an IP address, range or country from accessing your website

How to block or trust an IP address, range or country from accessing your website

Pradheep BS
Written by Pradheep BSLast update 4 months ago

With Astra Website Protection, you can control who can access your websites based on the follwing:

  1. IP Address (IPv4 & IPV6)

  2. IP Range (IPv4 & IPV6)

  3. Country

  4. Other HTTP parameters (using Security Boosters)

If you create a block rule, then the visitors will be shown a "Access Restricted" page. For trust rules all security checks are disabled, so use sparingly.

How to Block or Trust an IP address or IP range





  1. In the Astra dashboard, go to the Threats page for your website

  2. Scroll down to the Trusted & Blocked List & click on Block/Trust IP button

  3. Select Trust/Block IP Address

  4. Enter the IP address in IPv4/IPv6 format OR the IP Range in CIDR format

  5. You can enter a Note which will help you remember why you created this rule

  6. Now select the action you want to take. Select either Block, or Trust.

  7. Click on Add Rule to activate the rule

How to use a CIDR range?



CIDR is an industry used notation for IP ranges. You can specify the ranges as per the following:

  • A range of IPv4 addresses, in CIDR block notation. For example, 203.0.113.0/24

  • A range of IPv6 addresses, in CIDR block notation. For example, 2001:db8:1234:1a00::/64


Learn more about CIDR

How to Block a Country



Let’s say you are based out of the UK & have no business in Ukraine but see a lot of traffic from Ukraine – it might be a good idea to block Ukraine as there could be some bots trying to find vulnerabilities in your website from a country where you do not do business.

  1. In the Astra dashboard, go to the Threats page for your website

  2. Scroll down to the Trusted & Blocked List & click on Block/Trust IP button

  3. Select Trust/Block Country

  4. From the dropdown, select the 1 or more countries

  5. You can enter a Note which will help you remember why you created this rule

  6. Now select the action you want to take. Select either Block, or Trust.

  7. Click on Add Rule to activate the rule

Did this answer your question?