Now a days there is an issue of low quality traffic. Some countries affect the page impressions. So here the tekshek brings the most easy way to stop the unwanted traffic of a whole country.
Just follow the following steps
- Install the wordpress plugin WP-BAN
- Then visit the following site to get the all ranges of ips for that country
- After installing the plugin then go to Ban by range
- In that box enter the all ips from site
- Now save changes
- Traffic is blocked now from that country
And for all other websites follow the following steps
- Visit site
- Select a country you want to block and get code
- Open your ftp account
- Edit your .htaccess file and paste the code
- If you don’t have a file named .htaccess then make a file with this name, paste the code and upload it into your ftp
- Now traffic from that country is blocked
I am going to ask a stupid question here but why would you want to block the traffic from a whole country?
This is a nice tip, half of my traffic comes from countries that I can't make any money from, thanks.