Getting Started

Deployment Deployment - Diagnose Migrations Staging

Site Management

Backups Client Reporting Passwords Plugin Automation Plugin Management - Global Plugins & Themes - Diagnose Plugins & Themes - General Plugins & Themes - Git Plugins & Themes - Logs Must Install White Label WordPress Updates

Caching & Performance

Caching Caching - Blogs/Articles Caching - Diagnose Caching - Git Caching - WooCommerce Redis Optimize & Scale

Security

Security Security - Firewall

SMTP, CDN & DNS

SMTP SendGrid CDN CDN - AWS CDN - Cloudflare CDN - Diagnose Domains & DNS

Server & Tools

Analytics & Logs CRON Jobs Database Debug Tool Git Monitoring PHP Settings Redirects SEO Tools Server Errors sFTP SSL

Staq Billing

Staq Billing > Account Staq Billing > Client Staq Billing > Setup

Media

Media Media - Diagnose Media - Optimize

Accounts & Billing

Accounts & Billing

General

WordPress Hosting Website Diagnose Troubleshoot - Other

How to block a country in the firewall


On this page

    For security, compliance, or operational reasons, you may wish to block visitors from certain countries from accessing your WordPress site. With Staq Firewall, blocking access by country is quick and easy using geo IP rules.

    Step-by-Step: Blocking Countries via Staq Firewall

    1. Log in to the WordPress site hosted on Staq.
    2. In the left menu, click Staq Hosting.
    3. Click Firewall.
    4. Click the Ban Rules tab.
    5. Click Create New Rule.

    Create New Ban Rule

    Select Country Blocking Rule Type

    1. Under Rule Type, select Country Blocking.
    2. Choose the countries you want to block.

    Country Blocking Rule Type

    Choose a Blocking Condition

    If you want to block the countries you selected, choose:

    • Ban IP addresses from the selected countries (inclusion)

    Inclusion Condition

    If instead you want to block all countries except a few selected ones, e.g., only allow traffic from Australia, then select Australia from the Countries list and then choose the condition as:

    • Ban IP addresses from the unselected countries (exclusion)

     

    Exemption Check

    Enabling this setting allows safe, verified bots (like Googlebot, Bing, Meta, OpenAI, etc.) to bypass your country block — even if their IP address comes from a restricted country:

    Exemption Check

    Script Blocking Mode

    If set to Yes, banned users will be silently blocked at the Nginx level without seeing an error or CAPTCHA. This reduces server load, but may lead to false positives.

    If set to No, blocked users will see a reCAPTCHA page and can request access by verifying themselves — a safer option if you’re unsure.

    Script Blocking Mode

    Final Step

    Once you’re done configuring the rule, click Save Rule to activate it.

    Need some help?

    We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.