2 Methods To Crush Scrapers & Hackers With Wordfence

Wordfence is a well-liked WordPress safety plugin. Among the many options are scanner that displays for hacked recordsdata and a firewall with commonly up to date guidelines that proactively blocks malicious bots.

There’s additionally a helpful characteristic tucked away within the device that makes user-configurable firewall guidelines obtainable that may supercharge your capability to dam hackers, scrapers and spammers.

For some motive this device will not be instantly seen and it’s a must to click on via a number of menus to search out it.

However as soon as you discover it you’ll uncover a straightforward and efficient strategy to block scrapers, hackers and spammers from attacking your web site.

Scrapers are particularly troublesome as a result of they plagiarize your content material and publish it elsewhere.

Now, with the device supplied by Wordfence you are able to do one thing about these scrapers.

Utilizing a device like Wordfence may help scale back the quantity of content material that scrapers can plagiarize.

There are a lot of WordPress safety plugins and SaaS options to select from which are extremely beneficial, together with Sucuri Safety and Cloudflare. Wordfence is considered one of many safety options obtainable and it’s as much as you to determine which feels extra comfy inside your workflow.

Wordfence and different options operate advantageous as a set it and neglect it answer.

Nonetheless, in my expertise I’ve discovered that the consumer configurable firewall in Wordfence offers one a chance to dial up the bot hammering energy and actually stick it to the hackers and scrapers.

However earlier than you dial up the firewall it’s vital to understand how far these firewall guidelines may be taken and we’ll check out that, too.

Wordfence WordPress Safety

Wordfence is trusted by over 4 million customers for shielding their WordPress websites.

The default Firewall habits is to dam bots that seize too many pages too quick or bots and people that show actions that sign an intent to hack the location.

The firewall will block the IP tackle of the rogue bot for a set time period, after which Wordfence drops the block.

The default settings on the firewall works nice.

However typically bots nonetheless get via and are capable of scrape a web site or probe it for vulnerabilities by scraping the location slowly.

A typical strategy by hackers is to set a bot to hit the location rapidly and when it will get blocked it is going to rotate to different IP addresses and consumer brokers, which causes a firewall to begin the detection course of once more.

However these bots aren’t at all times programmed very properly which makes it straightforward to dam them extra effectively than with the default Wordfence settings.

Background Info About Wordfence Firewall Guidelines

It’s attainable to perform environment friendly bot blocking with server stage instruments, a number of plugins and even by means of an .htaccess file.

However enhancing an .htaccess file may be tough as a result of there are strict guidelines to comply with and a mistake within the .htaccess file could cause your complete web site to fail.

Utilizing firewall guidelines is solely a better strategy to block bots.

What Can You Block With Wordfence?

Wordfence means that you can create guidelines to dam in response to every of the next causes:

  • IP Tackle Vary
  • Hostname
  • Browser Consumer Agent
  • Referrer

IP Tackle Vary

IP tackle means the IP tackle of the server or ISP that the bot or human is coming from.


Hostname means the identify of the host. The host isn’t at all times declared, typically the bot/human customer shows simply an IP tackle.

Browser Consumer Agent

Each web site customer usually tells the server what browser it’s utilizing. Browser Consumer Agent means the browser that the customer says it’s utilizing.  A bot can say it’s nearly any browser, which they generally do in an effort to evade detection.


This can be a web page {that a} bot or human supposedly clicked a hyperlink from.

Wordfence Customized Sample Blocking

The best way to dam dangerous bots utilizing any of the above 4 variables is by including a customized rule within the Customized Sample Blocking device.

Right here’s the way to attain it.

Step 1

Click on the hyperlink to the Firewall from the left facet admin menu in WordPress

Wordfence Step 1

Step 2

Select the tab labeled Blocking

Wordfence step 2

Step 3

Select the “Customized Sample” tab and create a firewall rule within the applicable discipline. One of many fields is labeled “Block Motive.” Use that discipline so as to add a descriptive phrase like Hostname, Consumer Agent or no matter. It is going to enable you to to assessment all guidelines you create by having the ability to type by what sort of block it’s.

Wordfence step 3

Step 4

Wordfence step 4

Step 5

Make your rule by clicking the “Block Guests Matching This Sample” button and also you’re accomplished.

Wordfence step 5

Wordfence guidelines can use the asterisk (*) as a wild card.

Ought to You Block IP Addresses with Wordfence?

Wordfence makes it straightforward for a writer to arrange firewall guidelines that effectively blocks bots.

That’s a blessing however it will also be a curse. For instance, completely blocking 1000’s of IP addresses utilizing Wordfence firewall will not be environment friendly and doubtless not a correct use of Wordfence.

Briefly blocking IP addresses is ok. Completely blocking IP addresses in all probability not advantageous as a result of, as I perceive it, going by reminiscence, this will bloat or decelerate your WordPress set up.

Generally, completely blocking 1000’s and even thousands and thousands of IP addresses is finest completed with an .htaccess file.

Hostname Blocking with Wordfence

Blocking a hostname with Wordfence generally is a strategy to block hackers, spammers and scrapers. By clicking Wordfence > Instruments you possibly can view the Wordfence Reside Visitors log.

That reveals you bot and human guests, together with bots that had been blocked robotically by Wordfence.

Not all web site guests show their hostname. Nonetheless in some circumstances they do show their hostname and that makes it straightforward to dam a complete net host.

For instance, one web site, for no matter motive, attracts DDOS ranges of bot visitors from a single host. None of my different websites attracts that a lot consideration from this host, simply this one web site.

Between March 2020 and December 2021 that one web site obtained over 250,000 assaults and each single considered one of them was blocked by Wordfence.

Clearly, blocking bots by hostname may be helpful if you wish to block a cloud host that sends nothing however hackers and scrapers.

Nonetheless some hosts, like Amazon Net Companies (AWS) ship each dangerous bots and good bots. Blocking AWS servers may also inadvertently block good bots.

So it’s vital to observe you’re visitors and be completely sure that blocking a hostname won’t backfire.

Then again, you probably have no use for visitors from Russia or China, then it’s straightforward to dam hackers, scrapers and spammers from these two nations by making a firewall rule utilizing the hostname discipline.

All it’s a must to do is create a rule that blocks all hostnames that finish in .ru and .cn. That may block all Russian and Chinese language hostnames that finish in .ru and .cn.

That is what you enter into the Hostname discipline:


This isn’t meant to encourage anybody to make use of Wordfence to dam Russian and Chinese language bots by way of the hostname. It’s simply an instance to point out the way it’s accomplished.

Block Hackers and Scrapers By Consumer Agent

Many rogue bots use outdated and outdated browser consumer brokers.

After Russia invaded Ukraine I observed a rise in hacking bots utilizing the Chrome 90 consumer agent (UA) from the identical group of net hosts. Usually bot visitors is completely different throughout the completely different web sites. So this stood out once they all seemed the identical throughout all of my websites.

At any time when Wordfence robotically blocked these bots for hitting my web site too quick the bots would change IP tackle and start hitting the websites time and again.

So I made a decision to dam these bots by their Browser Consumer Agent (sometimes called merely, UA).

First I checked the StatCounter web site to find out what number of customers all over the world are utilizing Chrome 90. Based on the StatCounter statistics, Chrome 90 browser share as of January 2022 stood at 0.09% market share within the USA.

On the time of this writing the Chrome browser is at model 100. Contemplating that Chrome robotically updates browser variations for the overwhelming majority of customers it’s not stunning that the utilization of Chrome 90 is nearly nothing, so it’s very  unlikely that blocking all guests utilizing a Chrome 90 browser consumer agent won’t block an precise and legit particular person visiting your web site.

So I decided that it’s protected to dam something that reveals as much as my web site with the Chrome 90 consumer agent.

Nonetheless, there are on-line instruments, like GTMetrix and a safety server header checker, that use the Chrome 90 consumer agent.

So if I blocked all variations of Chrome 90 (by utilizing this rule: *Chrome/90.*), I’d additionally block these two on-line instruments.

One other strategy to do is to take a look at the particular Chrome 90 variants utilized by the hackers and the net instruments.

GTMetrix and the opposite device use this Chrome UA:


Hackers and scrapers use these Chrome UAs:


So, if you wish to enable the net instruments to nonetheless scan your web site but in addition block the dangerous bots, that is an instance of the way to do it:


That is the way to block Chrome/90.0.4430.93:

How to block Chrome 90 with Wordfence

Caveat About Blocking Consumer Brokers

Earlier than blocking Chrome 90 I saved checking the Wordfence visitors log (accessible at Wordfence > Instruments) in an effort to make certain that no legit bots, like GTMetrix, are utilizing Chrome 90 was utilizing that consumer agent.

For instance, you may not wish to block Chrome 96 as a result of a few of Google’s instruments use Chrome 96 as a consumer agent.

At all times analysis whether or not reliable bots are utilizing a specific consumer agent or hostname.

And straightforward strategy to analysis that’s by utilizing the Wordfence Visitors Log.

Wordfence Visitors Log

The Wordfence visitors log reveals you at a look all consumer brokers accessing your web site in close to real-time. The visitors log reveals info similar to consumer agent, signifies whether or not the customer is a bot or a human, supplies the IP tackle, hostname, the web page being accessed and different info that helps decide if a customer is legit or not.

The best way to entry the visitors log is by clicking Wordfence > Instruments.

Blocking outdated browser variations is a straightforward strategy to block a whole lot of dangerous bots.  Chrome variations from the 80, 70, 60, 50, 30 and 40 collection are notably quite a few on some websites.

Right here’s an instance of the way to block outdated Chrome UAs which are  utilized by dangerous bots:


Once more, the above will not be an encouragement to dam the above bots.

The explanation I’d use *Chrome/6*.* is as a result of with a single rule I can block your complete Chrome 60 collection of consumer brokers, Chrome 60, 61, 63, and many others., with out having to write down all ten consumer brokers.

I can block your complete 60 collection with a single rule.

Don’t block the ten and up collection like this *Chrome/1*.* as a result of that can even block essentially the most present model of Chrome, Chrome 100.

The above is an instance of the way to block dangerous bots utilizing the described Chrome consumer brokers.

Dangerous bots additionally use outdated and retired Firefox browser consumer brokers and a few even show python-requests/ as a consumer agent.

Be Cautious When Creating Firewall Guidelines

At all times do your analysis first to find out what dangerous bots are utilizing by yourself websites and ensure that no reliable bots or web site guests are utilizing these outdated and retired browser consumer brokers.

The best way to do your analysis is by inspecting your visitors log recordsdata or the Wordfence visitors logs to find out which consumer brokers (or hostnames) are from malicious visitors that you simply don’t need.

Source link