Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsTo block countries on Hostinger’s CDN, open the website’s CDN settings, go to Traffic blocking, and add a country block. Before you do, understand two things: country rules work only on traffic that passes through Hostinger’s CDN, and they rely on IP geolocation, which VPNs and proxies can get around. Country blocking is a useful access-control layer, not a security boundary. You also choose one of two mutually exclusive modes, and switching between them erases your country list.
Block countries in the Hostinger dashboard
Dashboard labels can change, so if a name below differs from what you see, look for the same feature area inside the website’s CDN settings. Hostinger’s CDN optimization guide documents the Traffic blocking section and notes that some features depend on your plan.
As an Amazon Associate I earn from qualifying purchases.
- In hPanel, open Websites and choose Dashboard for the website you want to protect.
- Open CDN and click Manage.
- In the Traffic blocking section, click Block country or Add country block.
- Select the countries you want to restrict.
- Confirm with Block. The rule then applies to requests that reach the CDN from those countries.
Choose block mode or allow-only mode
Hostinger offers two country modes, and only one can be active at a time. In block mode, requests geolocated to the countries you select are denied and everyone else gets through. In allow-only mode, the countries you select are permitted and all others are blocked.
| Mode | What happens to listed countries | What happens to unlisted countries | Main risk |
|---|---|---|---|
| Block selected countries | Denied | Allowed | Covers only the countries you list; visitors from elsewhere can still reach the site, including attackers. |
| Allow only selected countries | Allowed | Denied | Can lock out customers, partners, payment callbacks, or API clients located outside the list. |
Warning: switching modes clears the existing country list, and Hostinger states that this cannot be undone. Copy your current country selections somewhere safe before you change modes, then re-enter them under the new mode.
#1 Best Overall
What country blocking can and cannot do
It depends on IP geolocation
A country rule matches each request against the geographic location associated with the visitor’s IP address. Hostinger says the feature is not foolproof: VPN and proxy users can appear to be in a permitted country and bypass a rule. Geolocation databases can also assign an address to the wrong country, so a rule may catch some legitimate visitors and miss some unwanted ones. Treat country blocking as one filter among several, not as proof of who is visiting.
It applies only to traffic passing through the CDN
Requests that reach your origin server directly, without going through Hostinger’s CDN, are not filtered by the country rule. The rule therefore protects the site only as far as all public traffic is routed through the CDN.
Plan limits apply
Country blocking is not available on Agency Hosting plans. If the option is missing from your Traffic blocking section, check your plan before troubleshooting further.
When a country block breaks a legitimate request
Blocking by country can deny services you depend on. A payment gateway callback, a contact form submitted from abroad, a login from a traveling customer, or an API request from a partner’s data center can all originate in a blocked country. Diagnose the problem before you edit the rule:
Rank #3
- Record the failing URL, the HTTP method (GET, POST, and so on), and the status code returned to the caller.
- Look for the
x-hcdn-request-idresponse header if your tool or browser shows it. Include that ID when you contact Hostinger support. - If the response is a 403, check the CDN security settings first, because Hostinger’s troubleshooting guidance associates 403 responses with CDN security filtering.
- If the caller could plausibly be in a restricted country, review your country rules and any IP rules that might cover the caller’s address.
- Change one rule at a time and retest the same request after each change.
Reading CDN analytics and origin logs
Hostinger says blocked requests can still appear in CDN analytics, because the CDN counts a request before it returns the 403. A country-blocked request showing up in analytics therefore does not mean it reached your website.
If a blocked-country request appears in your origin server logs, one of three explanations usually applies:
- The request arrived before you added the country block.
- The IP geolocation database placed the visitor in a different country from the one you expected.
- The request bypassed the CDN and connected directly to the hosting server.
Comparing the timestamp of the block with the log entry will usually separate the first explanation from the other two.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Other ways to restrict access
| Option | What it does | Consideration |
|---|---|---|
| Country block or allow-only | Filters requests by the geolocation of the visitor’s IP | Broad; affects everyone in the chosen countries and can be bypassed with VPNs or proxies. |
| IP or IP range blocking | Denies specific addresses or ranges through Traffic blocking | More precise when the unwanted source is known; it does not replace a country policy and needs ongoing maintenance. |
| Third-party CDN | Replaces Hostinger’s CDN with another edge service | Hostinger’s documentation advises enabling only one CDN at a time, so confirm compatibility and setup before switching. |
If the traffic you want to stop comes from a specific bot or scraper, an IP or range block is usually the better first step. Country rules work best as a coarse filter for regions you do not serve at all.
Best Value
- Used Book in Good Condition
Remove a country rule
- Return to Websites, open the site’s Dashboard, then CDN, and click Manage.
- In Traffic blocking, click the trash icon beside the rule.
- Confirm the deletion.
Removing a rule takes effect for new requests going through the CDN. Requests that were already blocked will simply be allowed on their next attempt.
The sources reviewed for this article did not state a numerical effectiveness rate or a timeframe for propagation of rule changes, so avoid assuming either.
”
The Bottom Line
Use country blocking for coarse, region-level restrictions on traffic that passes through Hostinger’s CDN, choose block or allow-only mode deliberately because switching clears your list, and check logs and analytics before concluding that a rule did or did not work. For anyone blocking abuse, pair it with IP or range rules and your own application-level checks.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




