{"id":666,"date":"2023-05-22T12:10:01","date_gmt":"2023-05-22T12:10:01","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/05\/22\/7931101-hostinger-cdn-how-to-block-countries\/"},"modified":"2026-08-20T02:34:09","modified_gmt":"2026-08-20T02:34:09","slug":"7931101-hostinger-cdn-how-to-block-countries","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/7931101-hostinger-cdn-how-to-block-countries\/","title":{"rendered":"Hostinger CDN: How to block countries"},"content":{"rendered":"<p class=\"no-margin\">Country blocking is a technique used to restrict access to a website based on the geographic location of the user&rsquo;s IP address.<\/p><p class=\"no-margin\"><a href=\"https:\/\/www.hostinger.com\/support\/7935917-hostinger-cdn-website-optimization\/\">Hostinger CDN<\/a> supports two country traffic modes: Block specific countries (deny selected countries) and Allow only specific countries (permit only selected countries, blocking all others). Only one mode can be active at a time.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Note that country blocking is not foolproof and can have limitations. IP addresses can be <b>spoofed<\/b>, and people may use<b> <a class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/tutorials\/what-is-vpn\/\" target=\"_blank\" rel=\"noopener\">virtual private networks<\/a> <\/b>(VPNs) or <b><a class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/tutorials\/proxy-vs-vpn\/\" target=\"_blank\" rel=\"noopener\">proxy servers<\/a><\/b> to bypass country-based restrictions. Therefore, it&rsquo;s often used as one layer of security or access control among other measures to protect systems and networks<\/p>\n<\/div><h2 id=\"h_83ee5bf9b6\">Block countries<\/h2><p class=\"no-margin\">In <b>hPanel <\/b>&rarr; <b><a class=\"intercom-content-link\" href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\">Websites<\/a><\/b>, click on <b>Dashboard <\/b>next to the website in question. Then, on the sidebar, search for <b>CDN<\/b> and open its settings:<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16170\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png\" alt=\"\" width=\"266\" height=\"667\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png 266w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28-120x300.png 120w\" sizes=\"(max-width: 266px) 100vw, 266px\" \/><\/div><p class=\"no-margin\">Click on <strong>Manage<\/strong> to access the CDN settings of the preferred website:<\/p><div class=\"intercom-container\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16191\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21.png\" alt=\"\" width=\"1132\" height=\"392\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21.png 1132w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-300x104.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-1024x355.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-768x266.png 768w\" sizes=\"(max-width: 1132px) 100vw, 1132px\" \/><\/div><p class=\"no-margin\">Now, open the section <b>Traffic blocking<\/b>, click on <b>Block country<\/b>, or <b>Add country block<\/b>, select the countries you want to block and click on <b>Block <\/b>to confirm:<\/p><div class=\"intercom-container\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16176\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-37_1.png\" alt=\"\" width=\"1147\" height=\"658\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-37_1.png 1147w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-37_1-300x172.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-37_1-1024x587.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-37_1-768x441.png 768w\" sizes=\"(max-width: 1147px) 100vw, 1147px\" \/><\/div><p class=\"no-margin\">And that&rsquo;s it!<\/p><h2 id=\"h-allow-traffic-only-from-specific-countries\">Allow traffic only from specific countries<\/h2><p>In addition to blocking countries, Hostinger CDN supports an <strong>Allow countries<\/strong> mode. When enabled, only visitors from your selected countries can access the website &mdash; all other traffic is blocked at the CDN edge.<\/p><p>To allow traffic only from specific countries, go to<strong> hPanel &rarr; <a href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\">Websites<\/a><\/strong>, click on <b>Dashboard <\/b>next to the website in question, then open CDN settings from the sidebar.<\/p><p><img decoding=\"async\" class=\"alignnone size-full wp-image-16170\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png\" alt=\"\" width=\"266\" height=\"667\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png 266w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28-120x300.png 120w\" sizes=\"(max-width: 266px) 100vw, 266px\" \/><br>\nClick on <strong>Manage<\/strong> to access the CDN settings of the preferred website.<\/p><p><img decoding=\"async\" class=\"alignnone size-full wp-image-16191\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21.png\" alt=\"\" width=\"1132\" height=\"392\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21.png 1132w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-300x104.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-1024x355.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21-768x266.png 768w\" sizes=\"(max-width: 1132px) 100vw, 1132px\" \/><\/p><p>Now, open the<strong> Traffic blocking section<\/strong> and click the <strong>Allow only specific countries<\/strong> toggle. Select the countries you want to allow and confirm.<\/p><p><img decoding=\"async\" class=\"alignnone size-full wp-image-10998\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-29_17-14.png\" alt=\"\" width=\"935\" height=\"543\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-29_17-14.png 935w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-29_17-14-300x174.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/05\/2026-05-29_17-14-768x446.png 768w\" sizes=\"(max-width: 935px) 100vw, 935px\" \/><\/p><p>&nbsp;<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p>Important:<\/p>\n<ul>\n<li>You can use Block specific countries OR Allow only specific countries &mdash; not both at the same time.<\/li>\n<li>Switching between the two modes will clear your existing country list. This action cannot be undone.<\/li>\n<li>Country-based rules rely on IP geolocation and are not foolproof. Visitors using VPNs or proxy servers may still bypass them.<\/li>\n<\/ul>\n<\/div><h2 id=\"h_c4a6ff33c6\">Remove the country block<\/h2><p class=\"no-margin\">To remove a country block, in <b>hPanel <\/b>&rarr; <b><a class=\"intercom-content-link\" href=\"https:\/\/hpanel.hostinger.com\/websites\" target=\"_blank\" rel=\"noopener\">Websites<\/a><\/b>, click on <b>Dashboard <\/b>next to the website in question. Then, on the sidebar search for <b>CDN<\/b> and open its settings:<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16170\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png\" alt=\"\" width=\"266\" height=\"667\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28.png 266w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-28-120x300.png 120w\" sizes=\"(max-width: 266px) 100vw, 266px\" \/><\/div><p class=\"no-margin\">Click on <strong>Manage&nbsp;<\/strong>to access the CDN settings of the preferred website:<\/p><div class=\"intercom-container\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16190\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-17.png\" alt=\"\" width=\"1162\" height=\"365\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-17.png 1162w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-17-300x94.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-17-1024x322.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-17-768x241.png 768w\" sizes=\"(max-width: 1162px) 100vw, 1162px\" \/><\/div><p class=\"no-margin\">Now, open the section <b>Traffic blocking<\/b>, click on the <b>trash bin icon<\/b>, and then click on <b>Delete<\/b> to confirm:<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16177\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-38.png\" alt=\"\" width=\"1170\" height=\"587\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-38.png 1170w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-38-300x151.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-38-1024x514.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_08-38-768x385.png 768w\" sizes=\"(max-width: 1170px) 100vw, 1170px\" \/><\/div><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Alternatively, you can also <b><a class=\"intercom-content-link\" href=\"\/support\/7930807-hostinger-cdn-how-to-block-ips\/\" target=\"_blank\" rel=\"noopener\">block IP addresses<\/a><\/b><\/p>\n<\/div><p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Blocking countries, and removing a country block<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[262],"tags":[],"class_list":["post-666","post","type-post","status-publish","format-standard","hentry","category-cdn"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/7931101-hostinger-cdn-how-to-block-countries\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/7931101-hostinger-cdn-como-bloquear-paises\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/7931101-hostinger-cdn-comment-bloquer-des-pays\/","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/support\/7931101-hostinger-cdn-como-bloquear-paises\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"predecessor-version":[{"id":16203,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/666\/revisions\/16203"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}