{"id":68,"date":"2021-11-20T13:08:55","date_gmt":"2021-11-20T13:08:55","guid":{"rendered":"https:\/\/alavps.com\/blog\/?p=68"},"modified":"2023-12-09T10:30:42","modified_gmt":"2023-12-09T10:30:42","slug":"2-easy-steps-to-block-any-country-from-your-site-using-htaccess","status":"publish","type":"post","link":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/","title":{"rendered":"2 Easy Steps To Block Any Country From Your Site Using .htaccess"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p>Some people may wish to block the country due to different reasons. Certain countries are notorious for being home to spammers or hackers. <a href=\"https:\/\/alavps.com\/blog\/cpanel-web-hosting-advantages-features-guide\/\">cPanel<\/a> comes with an IP blocking mechanism that helps protect your website from people you consider suspicious or even malicious. This is great for just one IP and even for a small number. However, it is not recommended in the event that you wish to block a country in its entirety with the <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/howto\/htaccess.html\">.htaccess files<\/a>.<\/p>\n<p>Many business website owners are looking to block a country because they have no business in their country. In any event, you can put the code in the .htaccss file to block the IP addresses of certain countries. Follow the steps below to accomplish this task.<\/p>\n<p>This simple and quick guide will help you to manage access to websites according to the location of visitors. With a few modifications made to the .htacess file, you can choose to permit or deny access to visitors from specific countries. Read on!<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_1_Generate_the_Countrys_IP_Addresses\"><\/span>Step 1: Generate the Country&#8217;s IP Addresses<span class=\"ez-toc-section-end\"><\/span><\/h2><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d7bd6c39025\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d7bd6c39025\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#Step_1_Generate_the_Countrys_IP_Addresses\" >Step 1: Generate the Country&#8217;s IP Addresses<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#Second_Step_Add_the_IP_addresses_generated_by_IP_Addresses_in_the_htaccess_File\" >Second Step: Add the IP addresses generated by IP Addresses in the .htaccess File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>Many online tools can be used to allow or deny visitors based on their country of residence. In this guide, we&#8217;ll be using country IP blocks.<\/p>\n<ol>\n<li>Visit the Country IP Blocks&#8217; website &#8230;&#8230;or &#8230; The first step is to gather data. You&#8217;ll want to find an accurate list of IP addresses for the country you wish to block. If you search for the IP, you&#8217;ll discover that you can have your deny list created by IP2Location&#8217;s <a href=\"https:\/\/www.ip2location.com\/free\/visitor-blocker\">no-cost generator for visitor-blockers<\/a>. This tool lets the user download a text file that contains the necessary code to block a particular country. <img decoding=\"async\" class=\"aligncenter wp-image-69 size-full lazyload\" data-src=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\" alt=\"\" width=\"668\" height=\"323\" data-srcset=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png 668w, https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess-300x145.png 300w\" data-sizes=\"(max-width: 668px) 100vw, 668px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 668px; --smush-placeholder-aspect-ratio: 668\/323;\" \/><\/li>\n<li>Choose the countries you wish to allow or block. For instance, we chose randomly Algeria. The output format we picked for example is Apache .htaccess reject. Follow these steps to download the file. \u00a0 <img decoding=\"async\" class=\"aligncenter wp-image-70 size-full lazyload\" data-src=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess1.png\" alt=\"\" width=\"663\" height=\"363\" data-srcset=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess1.png 663w, https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/How-to-Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess1-300x164.png 300w\" data-sizes=\"(max-width: 663px) 100vw, 663px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 663px; --smush-placeholder-aspect-ratio: 663\/363;\" \/><\/li>\n<li>In the Select Format section, choose Apache .htaccess Deny or Apache .htaccess Allow. The selection is based on whether you&#8217;d like to restrict or block access from these countries.<\/li>\n<li>Click Create ACL. Create ACL Using Country IP Blocks<\/li>\n<li>Your ACL results will be displayed on the upper right side of the screen. Select the Copy ACL clipboard button. Allow or Block Countries Using Country IP Blocks<\/li>\n<\/ol>\n<p>If you&#8217;re employing the function allowed, be sure to add deny at the top of the list of IPs that are allowed.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Second_Step_Add_the_IP_addresses_generated_by_IP_Addresses_in_the_htaccess_File\"><\/span>Second Step: Add the IP addresses generated by IP Addresses in the .htaccess File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Last, copy all the addresses for the nations you wish to restrict or block to the .htaccess file. Here&#8217;s how using <a href=\"https:\/\/alavps.com\">Alavps<\/a> cPanel<\/p>\n<ol>\n<li>Go to Files -&gt; File Manager.<\/li>\n<li>Choose your domain, then click Go To File Manager.<\/li>\n<li>Go to the folder public_html and double-click on the .htaccess file.<\/li>\n<li>Paste the ACL in your .htaccess file and click Save &amp; Close. The .htaccess files will be something like this: Allow or Block Countries with .htaccess File<\/li>\n<li>It is also possible to make use of the FTP client to modify this .htaccess file.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-71 size-full lazyload\" data-src=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\" alt=\"\" width=\"671\" height=\"404\" data-srcset=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png 671w, https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess-300x181.png 300w\" data-sizes=\"(max-width: 671px) 100vw, 671px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 671px; --smush-placeholder-aspect-ratio: 671\/404;\" \/><\/p>\n<p>If you&#8217;re unable to access your website after putting in the IP addresses generated make sure the IP addresses you are using are in the blocked list. Find your IP address by using What is My IP Address.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this article, you&#8217;ve learned a simple way to restrict or block visitors from certain countries. All you have to do is to create the IP address of your country using Country IP Blocks, and then include the access control list (ACL) in the <strong>.htaccess file<\/strong>.<\/p>\n<p>We hope that this article helped you. We&#8217;d love to hear from you in the comments section if have any queries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some people may wish to block the country due to different reasons. Certain countries are notorious for being home to spammers or hackers. cPanel comes with an IP blocking mechanism that helps protect your website from people you consider suspicious or even malicious. This is great for just one IP and even for a small [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":71,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting-advice","category-website-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog\" \/>\n<meta property=\"og:description\" content=\"Some people may wish to block the country due to different reasons. Certain countries are notorious for being home to spammers or hackers. cPanel comes with an IP blocking mechanism that helps protect your website from people you consider suspicious or even malicious. This is great for just one IP and even for a small [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"Alavps Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-20T13:08:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-09T10:30:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\" \/>\n\t<meta property=\"og:image:width\" content=\"671\" \/>\n\t<meta property=\"og:image:height\" content=\"404\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"alavpsblog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"alavpsblog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\"},\"author\":{\"name\":\"alavpsblog\",\"@id\":\"https:\/\/alavps.com\/blog\/#\/schema\/person\/67433f2932ad1e398db0b282cc965644\"},\"headline\":\"2 Easy Steps To Block Any Country From Your Site Using .htaccess\",\"datePublished\":\"2021-11-20T13:08:55+00:00\",\"dateModified\":\"2023-12-09T10:30:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\"},\"wordCount\":629,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/alavps.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\",\"articleSection\":[\"Hosting Advice\",\"Website Tips\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\",\"url\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\",\"name\":\"2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog\",\"isPartOf\":{\"@id\":\"https:\/\/alavps.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\",\"datePublished\":\"2021-11-20T13:08:55+00:00\",\"dateModified\":\"2023-12-09T10:30:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage\",\"url\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\",\"contentUrl\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png\",\"width\":671,\"height\":404},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/alavps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2 Easy Steps To Block Any Country From Your Site Using .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/alavps.com\/blog\/#website\",\"url\":\"https:\/\/alavps.com\/blog\/\",\"name\":\"Alavps\",\"description\":\"All About VPS &amp; Hosting\",\"publisher\":{\"@id\":\"https:\/\/alavps.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/alavps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/alavps.com\/blog\/#organization\",\"name\":\"Alavps\",\"url\":\"https:\/\/alavps.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/alavps.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-logo.png\",\"contentUrl\":\"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-logo.png\",\"width\":225,\"height\":44,\"caption\":\"Alavps\"},\"image\":{\"@id\":\"https:\/\/alavps.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/alavps.com\/blog\/#\/schema\/person\/67433f2932ad1e398db0b282cc965644\",\"name\":\"alavpsblog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g\",\"caption\":\"alavpsblog\"},\"url\":\"https:\/\/alavps.com\/blog\/author\/alavpsblog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog","og_description":"Some people may wish to block the country due to different reasons. Certain countries are notorious for being home to spammers or hackers. cPanel comes with an IP blocking mechanism that helps protect your website from people you consider suspicious or even malicious. This is great for just one IP and even for a small [&hellip;]","og_url":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/","og_site_name":"Alavps Blog","article_published_time":"2021-11-20T13:08:55+00:00","article_modified_time":"2023-12-09T10:30:42+00:00","og_image":[{"width":671,"height":404,"url":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png","type":"image\/png"}],"author":"alavpsblog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"alavpsblog","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#article","isPartOf":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/"},"author":{"name":"alavpsblog","@id":"https:\/\/alavps.com\/blog\/#\/schema\/person\/67433f2932ad1e398db0b282cc965644"},"headline":"2 Easy Steps To Block Any Country From Your Site Using .htaccess","datePublished":"2021-11-20T13:08:55+00:00","dateModified":"2023-12-09T10:30:42+00:00","mainEntityOfPage":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/"},"wordCount":629,"commentCount":0,"publisher":{"@id":"https:\/\/alavps.com\/blog\/#organization"},"image":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png","articleSection":["Hosting Advice","Website Tips"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/","url":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/","name":"2 Easy Steps To Block Any Country From Your Site Using .htaccess - Alavps Blog","isPartOf":{"@id":"https:\/\/alavps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage"},"image":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png","datePublished":"2021-11-20T13:08:55+00:00","dateModified":"2023-12-09T10:30:42+00:00","breadcrumb":{"@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#primaryimage","url":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png","contentUrl":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2021\/11\/Allow-or-Block-Visitors-from-Specific-Countries-using-htaccess.png","width":671,"height":404},{"@type":"BreadcrumbList","@id":"https:\/\/alavps.com\/blog\/2-easy-steps-to-block-any-country-from-your-site-using-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/alavps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"2 Easy Steps To Block Any Country From Your Site Using .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/alavps.com\/blog\/#website","url":"https:\/\/alavps.com\/blog\/","name":"Alavps","description":"All About VPS &amp; Hosting","publisher":{"@id":"https:\/\/alavps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/alavps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/alavps.com\/blog\/#organization","name":"Alavps","url":"https:\/\/alavps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/alavps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-logo.png","contentUrl":"https:\/\/alavps.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-logo.png","width":225,"height":44,"caption":"Alavps"},"image":{"@id":"https:\/\/alavps.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/alavps.com\/blog\/#\/schema\/person\/67433f2932ad1e398db0b282cc965644","name":"alavpsblog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8b3790daa42781f4c339d739e7ca7b1a944f02d59a994fad72790b42612ff000?s=96&d=mm&r=g","caption":"alavpsblog"},"url":"https:\/\/alavps.com\/blog\/author\/alavpsblog\/"}]}},"_links":{"self":[{"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":3,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions\/124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/media\/71"}],"wp:attachment":[{"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alavps.com\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}