Ahrefs bots are eating your bandwidth ? Here’s how to block them

The site ahrefs.com can purportedly tell any site owner, for prices starting from 99$ / month, who links to them from where, and also provide site owners with other seemingly significant and meaningful data about visitor activity.

The problem is, they use software bots to crawl sites, and THOSE BOTS CLICK ON LINKS in your site, if you have outgoing links, probably to verify if the outgoing links have real destinations or are just linkbaits. For a regular site, WITHOUT AFFILIATE connections, this probably won’t hurt anyone, but in the case of affiliate sites, regardless of affiliate programs, it’s a disaster.

Read more

Quick apache .htaccess rules writer in PHP

Sometimes it’s good to have a quick .htaccess rules writer for your server / host, to block a larger number of IP addresses from accessing stuff on your site, like spambots, or people (bored kids ?) who try to hack into your site or blog. If you use any kind of statistics plugin on your wordpress blog, or any other stats on other platforms, you can most likely see the IP addresses and the paths these visitors have taken, trying to access your site in an unauthorised way, like trying to exploit a revolution slider vulnerability to show your config.php, or some other plugin.

So here’s the quickest way to deal with these IP addresses, presuming you are on a linux box with PHP installed, or on any computer with PHP available in command line (php5-cli package on debian/ubuntu/mint/fedora/q4os , basically, on most modern linux systems, and xampp or wampp package on windows based machines).

Read more