ozsan — 2012-01-09T06:51:30-05:00 — #1
I would like to block a few countries from my website, I have been told that htaccess is the way to do it. Can anybody tell me how to do this and if I need to contact my host about doing it.
ralphm — 2012-01-09T07:08:36-05:00 — #2
It's not easy to block a whole nation, because each nation has a large range of IP addresses. Still, there are sites that keep records of these. Have a look at ip2nation.
technobear — 2012-01-09T11:00:05-05:00 — #3
There was another thread on a similar subject recently: http://www.sitepoint.com/forums/showthread.php?815637-How-to-Block-my-Website-in-China
While I was looking for that, I found an older one which might also be helpful:http://www.sitepoint.com/forums/showthread.php?652613-How-to-block-specific-countries-from-certain-pages-of-my-website
ozsan — 2012-01-09T18:46:46-05:00 — #4
Than you for that I will read the whole thread and it might clear things up for me.
ozsan — 2012-01-09T22:01:43-05:00 — #5
I contacted my web host and asked if there was anything in the current htaccess file I needed to keep and they fixed my problem for me. They have allowed only the countries I deal with access to my site, which is perfect.
Thank you for your suggestions and thank you Digital Pacific for your great support.
ralphm — 2012-01-09T22:19:59-05:00 — #6
Cool, glad you found a solution. I didn't know hosts offered that service. Funnily enough, I just moved to the same host recently, so good to know.
alexschmidt — 2012-02-16T10:15:19-05:00 — #7
I dont know if you need another opinion as it seems your problem is solved but there are some tools that help you with controlling the visitors of your sites. You can choose which countries will have access to your website. I found the Traffic Gatekeeper of Rankvision.com to help me with this for the sites I own.
dklynn — 2012-02-16T15:34:35-05:00 — #8