About Region Restrictions

In some cases, you might want to restrict access to your site from certain regions. There are several reasons for doing so; such as complying with (privacy) regulations, or to ensure that content can only be viewed by a desired audience.

And then there’s the security aspect to consider, as malicious actors often launch attacks from specific geographic regions. Blocking access from these regions helps to protect against targeted attacks originating from specific geographic areas. Really Simple SSL Pro (8.2) introduces the Region Restriction feature. This functionality allows you to prevent specific countries or entire continents from connecting to your site.

On initial activation of the Region Restriction feature, no regions will be blocked yet. Click the “Block” button next to a country or continent to block that region. If a visitor’s location matches any of the blocked regions; this prevents them from reaching your site altogether. Blocking is initiated before WordPress is loaded to reduce the impact of requests originating from blocked regions.


Really Simple SSL - Region Restrictions, Allowed Countries
List of currently allowed regions with “Block” button (click to enlarge)

To view the list of currently blocked regions, select Blocked in the dropdown menu. This will display any countries/continents that were previously added to the blocklist.

Clicking the “Allow” button removes the restriction for that region, and allows visitors from that region to connect to the site again.


Really Simple SSL Pro - Region Restrictions, Blocking countries
List of currently blocked regions with “Allow” button (click to enlarge)

The IP address of the administrator who enabled the Region Restriction feature is automatically added to the list of allowed IP addresses.

You can manually add IP addresses to the allow-list by clicking the Trust IP Address button. IPv4 and IPv6 addressing formats are both supported.


Really Simple SSL Pro - Region Restrictions, Trusted IP addresses
List of trusted IP addresses (click to enlarge)

After adding regions to the block list, visiting the site from any one of those regions will present the visitor with the following message to indicate that connecting from their region is not permitted.

Really Simple SSL Pro - Connecting from a blocked region

Disabling Region Restrictions when you are locked-out

It could be that you accidentally locked yourself out, for example: you blocked your own country, and your IP address is not included in the list of Trusted IP addresses.

In such cases, you have the possibility to disable Region Restrictions in Really Simple SSL with a constant that can be defined in the wp-config.php file.

Add the following line to your wp-config.php file

  • define( 'RSSSL_DISABLE_REGION_BLOCK', true );

    (This disables the Really Simple SSL Region Restriction checks on the site)

After logging in and removing the country block, or adding your own IP to the allow-list; the line can safely be removed from the wp-config.php file.

 

Lightweight plugin, Heavyweight Security features. Get Pro and leverage your SSL certificate for WordPress security standards.