9 Nov
So my last resort was to block the whole country and sending them to a Forbidden page that says “You don’t have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request”. It did reduced the amount of chargebacks significantly and I didn’t notice any drops on the sales because the legitimate buyers comes from other countries.
To block a country using .htaccess, you must first need to know the IP address range but Block A Country and Country IP Blocks simplifies all that.
Block A Country is a free service that automatically generates a .htaccess with countries that you want to block. All you need to do is select the countries from the list and click the “Go” button. You will then need to create a .htaccess file at the root of your public html folder and paste the codes to that file. Do take note that the default code generated by Block A Country redirects the unwanted visitor to http://www.blockacountry.com/blocked.php
Country IP Blocks is similar to Block A Country but it allows you to choose CIDR (Classless Inter-Domain Routing), Netmask, IP Range, .htaccess deny, .htaccess allow, Decimal/CIDR, or Hex/CIDR. It will also tell you what’s the ISO code for the country, total networks and subnets in the list.
Once in a while the forum will be disturbed by a person named Gurjeet Singh Komal from Meerut, Uttar Pradesh India. He was probably the biggest fan of this website but backfired and turned into the biggest enemy because he was banned for not following the forum rules even after several warnings. He’d sign up a new account and start creating new threads by posting nonsense. It’s definitely unfair to block India from this site just because of him. As far as I know, there are many nice people from there too! Moreover it is also easy to get around this country banning restriction by using web proxy.
: Copying this article to your website is strictly NOT allowed. However, if you like this article, you can use the HTML code below to directly link to this article.
Parsing PHP in HTML or HTM Files Fix Wordpress Not Acceptable Error 406 Access and Watch Veoh Even if Veoh Is No Longer Available in Your Country Blocking PING Response in Windows to Prevent Hackers from Finding You How to Trace Location From an IP Address 3 Free and Easy Ways to Chat With Visitors On Your Website How Effective is Blocking Websites using HOSTS file?
Have computer technical problems? Get FREE help from Raymond.CC FORUM
18 Responses for "Easily Block Visitors from a Country using HTACCESS"
thanx for not blocking india ray….. coz m a gr88 fan of your posts..
thanx once again
God one Ray..
Hi Ray,
This month first week itself I faced the same page while trying to get the KIS 2010 Licence key from PC Magazine promotion page.
Checked today and the message shown :
“Access to this website had been denied.
Unfortunately, the owner of the website you wish to access decided to block visitors coming from your country.”
I haven’t tried using proxy.
But before they blocked their site, I managed to get a key, but when I tried to activate my KIS 2010, it said, key is black listed.
I’m activated trial licence and only 20 days left.

[SOS]
I’m from Kerala, India and it is very sad to know that Gurjeet Singh didn’t followed the forum rules.
And never think of banning India..
Regards,
Finson
so no one used a proxy server to buy the books ?
Thanx 4 not blocking india ray..Even if you did, i would have most probably used a web proxy
Lmao dont u ban india ud lose so many readers and massive fans like me.. Im sure he was the exception than the norm
thanx.. for not blocking INDIA.. Ray
Hey Ray,
thanks for the post. I would say same thing what others said india has lot of fans for raymond.cc.
I am runing a blog with avrage daily visit count with 700 visitors allover the world and I recomend only few website thier and one of those website is yours because I like to give quality content only to my visitor and whatever you write is almost uniqe no copy paste from any where.
Thanks for your nice and usefull articles
” As far as I know, there are many nice people from there too! ”
i loved this lines of yours Raymond.
u have given a great support to all of us and because of one we cant blame the whole of people.
thanks for the information.
but,never ever think of banning india.
”As far as I know, there are many nice people from there too!” -this line touched my heart, thx ray…u r the best…Regards, Rohan, 1 of the biggest fans of Raymond
Thanks so much, Ray!
Hi raymond
Which firewall you use for your real computer(not your test computer)?
You advise me which firewall is the best.
Thank Raymond
Block people visiting from certain countries is a dirty game! One people, one world. It’s like hidden racism. No bad nations, any country ha few bad people,not all.
Thanks for another fantastic post hats off man, and please remember that there are many fans of ur fans esp from india
@Candy +1
I really do appreciate what you do.I love the way you track down those precious freebies,sometimes from as far away as China .
In fact,you did get an award for that.This year.
Very good.
But this tool..That’s exactly,what the internet NOT should be.
Building up these frontiers again? Why,you off all people should be opposed to something like that.
I am really sorry about this.
is there ANY way I can block all of Brazil from spamming me to my yahoo email? I never subscribed to anything from that country to that address and continuously receive loads of spam daily from different IP’s in Brazil. I have no one in Brazil and they have no business contacting me from there.
If they are from a known provider such as hotmail, I copy and paste full headers for them to remove the user, but sometimes they’re not, so I was wondering if there’s any way I can just block the entire country from accessing my yahoo mail. I know you understand that the ppl @ yahoo are completely incompetent when it comes to answering questions so I ended up here myself to see if anyone here knows.
THANKS!!! any help would be great (if at all possible to do this)
Leave a reply