The perishable press Blacklist for your .htaccess file is a great help in limiting the number of malicious requests that hit your website.
However adding the list can cause trouble on your website. If that is the case you need to isolate the part of the Blacklist which is causing the problem.
The easiest way to do this is by using the halving method.
This article shows you a practical example of the halving method.
The current version of the blacklist is 5G and can be found here.
If you are using WordPress we recommend you also use the WordPress Add-on for 5G Blacklist.
The full block of code is:
|
After adding the code to the .htaccess file I have a problem performance testing my site.
When gtmetrix.com tries to measure the performance I get the following error:
First step is to verify that the problem is in fact caused by the Blacklist.
We do this by deleting the whole block of code again, saving the changes and re-running the performance test.
The fact that gtmetrix gets a 403 error is a pretty good indication that this is a problem with the Blacklist.
And sure enough, without the Blacklist the performance test works.
Next step is to narrow down exactly where the problem in the Blacklist is.
We paste the first half of the code (Query Strings and User Agents) back into the .htaccess file and test again.
|
And the performance test still works.
Now we know that the problem is in the second half of the code.
We add the Request String section to the .htaccess file and test again.
|
The performance test fails again.
As we don’t know if there is more than one problem we take out the Request String section again and add the Bad Ips section.
|
The performance test works again.
So now we know that the problem is in the Request Strings section.
Next step is to remove half of the Request Strings section to identify which line of code is problematic.
We can safely leave the rest of the Blacklist in the .htaccess file and focus on the Request Strings section.
We delete the second half of the code:
|
The performance test fails.
To ensure we are not looking at two problems we now test with the second half of the code.
|
The performance test works again.
So now the problem is isolated to the first half of the code.
Again we remove half of the first half of the code.
|
The performance test works again.
Now we remove only the first three lines.
|
The performance test fails.
So we know that the problem is in line 4 or 5.
We remove line 4 only.
|
The performance test still fails.
We remove line 5.
|
The performance test works.
You can choose simply to take out all of line 5, but we want to keep as much of the code as possible.
Now we remove half of line 5.
Notice the structure of the line. The | character is a separator, and you can remove blocks of code delimited by the separator. The whole line is in a bracket ( ) too, so leave those in.
|
The performance test fails.
We remove the first half of the line to verify our finding.
|
The performance test works again.
By removing each of the remaining blocks one at a time we identify the code // as being the trouble maker. So now we can remove only that part of the code.
|
Voila, you have now got a working Perishable Press Blacklist.
If you are using WordPress we recommend you also use the WordPress Add-on for 5G Blacklist.




Hello, Thank you very much for the Great Tips , i vouch WP Security Check list such a clear explanation , am a total new head & helped me a lot .
With 5G BLACKLIST/FIREWALL when i tried to add new menu i got 403 error and I tired your medicine , It WORKED !
i narrowed down to one line on the top last line ;RewriteRule .* – [F]
I first delete this whole line it worked and then i just delete [F] it worked again !
Thank you !
Awesome tut!
I will be sure to use this modality next time something inevitably breaks.
Thanks for taking the time to lay it out for me to play it out.