Google sometimes tries to index the author archives. That’s not unusual and also that’s the reason why the firewall doesn’t block the access, but instead redirects to the index page (Google wouldn’t like the 403 Forbidden message).
Is this your own server, i.e., do you have root access? If you do, I recommend to restrict the traffic at the kernel firewall level for this purpose. Otherwise, at the .htaccess or with NinjaFirewall’s .htninja script.
Thread Starter
Irene
(@arlinaite)
“the firewall doesn’t block the access, but instead redirects to the index page (Google wouldn’t like the 403 Forbidden message).”
I have the following issue, good bots are following referral spam links that request directly the WP internal search. They get an empty result page. I am blocking them now, but I assume by your answer this is not a good policy. What should be the correct status code to show to them?
It’s my own server managed by Cloudways, they told me that they could restrict to Cloudflare but it will block Ezoic, which is weird to me because I am integrated with Ezoic inside Cloudflare.
I am planning to do this with ninja.
Is there a way to block by AS number?
Or I have to use:
// Blacklist all IPs from 1.1.1.1 to 1.1.1.255:
// if ( preg_match( '/^1\.1\.1\.\d+$/', $_SERVER["REMOTE_ADDR"] ) ) {
// return 'BLOCK'; // blacklist
// }
Thanks for all your valuable help
Maybe you could try “410 Gone”, which means the page is no longer available?
AS number whitelist and blacklist are only available in the WP+ Edition. In the WP Edition, you could need to use the .htninja to block IP ranges but not ASN.