Mobile app version of vmapp.org
Login or Join
Deb1703797

: How do I block India from visiting my site? I want to avoid large scale content theft and plagiarism‎ which mainly comes from India as they have no laws preventing Indians from stealing content.

@Deb1703797

Posted in: #Block #CountrySpecific

I want to avoid large scale content theft and plagiarism‎ which mainly comes from India as they have no laws preventing Indians from stealing content.

Is this possible via .htaccess or some other method? Or can I simply remove my domain from showing in Google's search results in India?

I just don't see any point in serving my hard earned work in India when a large percentage of content theft I experience comes from this country.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

4 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno851

Blocking a country is complicated and the other answers posted here explain the drawbacks such as thieves scraping your site from a proxy server outside their country, etc. However to answer your technical question here are two ideas to explore.

The Easy Way

I don't know what kind of site(s) you operate but static sites can go on AWS CloudFront and you may choose which countries to allow or block with their 'Geo Restriction' feature. Then AWS implements the technical part for you. Other CDNs or static file hosts likely offer the same thing so shop around.

The Hard Way

Let's assume you run your own server, and that it runs a Debian-based Linux distro. You block large IP ranges with the ipset package. It depends on iptables so install them both: apt install iptables ipset

Now you need a list of IP blocks per country, which are available from ipdeny.com.

Get started with the command ipset --create countries hash:net, then populate the country set with rules /etc/ip-tables-set/ipset-rules-importer then add the list of rules to iptables with iptables -A INPUT -m set --match-set countries src -j DROP.

I think a full tutorial on ipset is beyond the scope of your question (and not a great fit for this particular site), but if you are determined to block direct visits from IP addresses in one or more countries, that's the way to go. You will have to keep the list of IP addresses updated and make sure it persists across reboots, etc. This is not a trivial task and you are probably better off just accepting that some people will steal your original content no matter what you do.

10% popularity Vote Up Vote Down


 

@Harper822

I want to avoid large scale content theft and plagiarism‎ which mainly comes from India as they have no laws preventing Indians from stealing content.


I don't understand how you come across the conclusion that india is the only source that is accessing your site to steal content. I'm gonna apologize here for a minute because we must make an assumption that a bunch of people from several parts of the world (not just india) are interested in stealing content.


Can i simply remove my domain from showing in Googles search results in India?


I don't understand why. Let's face it. If you earn money as a result from visitors accessing your website (for example, you have adsense and legit users interested in ads are clicking on them on your site), then why block the entire country? What happens if one person in india wanted to go to your site and wanted to purchase all your products and/or services you offer? That could be a big chunk of money you'd be missing just because you blocked india.


I just don't see any point in serving my hard earned work in India when a large percentage of content theft i experience comes from this country.
How Do I Block India From Visiting My Site?
Is this possible via .htaccess or some other method?


Answer

Let's start over.

What you really need to do is look for content scrapers. Look at your access logs on your server and see who is accessing your pages and how often. Sometimes you'll find one specific IP address trying to access 20+ items per second. Such IP addresses should be investigated because whoever runs those IP address could either be stealing content and/or hacking your server, especially if the pattern repeats every day.

You can use .htaccess to redirect guests with certain IP addresses to other pages and such and there are tutorials about this on the net, but your first step here is to check your server logs and see who really is accessing your website at a ridiculous rate.

Once you get the offending IP addresses taken care of, you can use a whois utility (one online at whois.com) and put in the IP address in the search box (online) or as a parameter (for the whois commandline tool) and the results will likely show the origin of the IP address. You'll be surprised that india isn't the only origin that shows up.

10% popularity Vote Up Vote Down


 

@Berumen354

You'll never be able to block malicious users of an entire country. Likely, they are using automated methods to scrape your content, so I'd suggest making your site really annoying and time consuming to scrape if youre really worried. Otherwise, such is the nature of the internet.

10% popularity Vote Up Vote Down


 

@Radia820

Err? India does have copyright laws...

Sorry to say but your comment about India not having copyright laws is utter non-sense and unfounded. Furthermore its highly doubtful that your hard work is not being rewarded because Google penalises sites for copying identical, it can take some time but it happens.



Scrapers use a range of online and local tools

Scrapers do not limit themselves to using Google to pick sites, they use a large range of tools, Bing, Yahoo, Google, Domain registration lists and so on.



Detect users in India using GEO IP

But if you insist to fight a worthless cause then you can use MaxMind or a free one with less IP's in their list Free GEO IP, using their API you can build a block based on region.



But wait, who does the scraping?

It should be noted... people who scrape, do not scrape data using their broadband connection, they use 100's of proxies on a wide range of IP address from all over the globe as Google throttles and blocks IP addresses that search too often. Also, scrapers won't limit themselves to Google.in so that's a pointless idea to say the least.



Stop wasting your time with this idea

Blocking a entire country is silly and in fact near impossible because not all IP addresses return correct GEO information. Stop wasting your time with this ideology and go down the correct route of issuing a DCMA complaint to Google that then can remove the page from its index.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme