Comments on: How to Block IP by Country: Restrict Access to Your Website from Specific Countries Using .htaccess https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess Wed, 13 Mar 2024 08:08:25 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Benefita https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-1135286 Wed, 13 Mar 2024 08:08:25 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-1135286 In reply to Oleksandr.

Hi there! Yes, Hostinger primarily uses Nginx as a web server. However, for Web Hosting and Cloud Hosting services, Hostinger provides a setup that allows the use of .htaccess files, which are typically used with Apache web server. To create an .htaccess file from your panel, go to Websites → Manage, search for File Manager on the sidebar and click on it ?

]]>
By: Oleksandr https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-1108901 Tue, 27 Feb 2024 05:23:42 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-1108901 Hello
As I understand that hostinger uses ngix, but also allows to use htacces rules at same time?
Is it possible to restrict access to some files in directory by mask?
Thank you

]]>
By: Domantas P. https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-471084 Fri, 18 Nov 2022 13:21:14 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-471084 In reply to Ajay.

Hey!

If you limit access to your website from a specific country, any visitor from that country will get an error while accessing your URL, website might still be visible in Google searches based on website’s indexing, however it will have no affect to website’s SEO, so your rankings in the allowed countries would not suffer.

]]>
By: Ajay https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-467681 Mon, 14 Nov 2022 16:18:17 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-467681 Hi Elvinas, very useful information but i would like to one thing that if I am blocking traffic from specific country that means my website will not accessible from that specific country, right? and secondly by doing this is it my website will disappear from the blocked country search engine. For example: I have blocked UAE traffic so my website will not appear in Google UAE search engine right? & third thing is this affect my site ranking in other country search engine like Google USA?

I would like to know your thoughts.

]]>
By: domantaspocius https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-346425 Fri, 01 Jul 2022 13:14:31 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-346425 In reply to Deniz.

Hey there! No worries! You can add the code to block IP addresses from a specific country near the end of your.htaccess file, under any other entries in the file ?

]]>
By: Deniz https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-342048 Thu, 23 Jun 2022 11:11:10 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-342048 Where do i add the line “deny from all”? At the beginning? At the end? Sorry, i’m a tech-noob 🙁

]]>
By: Vakarė https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-280342 Tue, 01 Mar 2022 12:59:15 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-280342 In reply to biz.

Hi there! When allowing an IP, make sure to have the line deny from all to block the rest of the traffic (step 6). Let me know how it goes for you!

]]>
By: biz https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-277400 Tue, 22 Feb 2022 17:14:15 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-277400 I’m using method to allow some IP address. but it doesn’t work. can you please give another method or tell my why this method not works for me

]]>
By: Vakarė https://www.hostinger.ph/tutorials/htaccess/how-to-allow-or-block-visitors-from-specific-countries-using-htaccess#comment-241976 Tue, 21 Sep 2021 08:16:33 +0000 http://blog.hostinger.io/hostinger-tutorials/%category/htaccesshow-to-allow-or-block-visitors-from-specific-countries-using-htaccess/#comment-241976 In reply to Peter.

Hi Peter! Thanks for pointing that out, our team is already working on updating this in the article 🙂

]]>