Someone created approximately 2000+ bad/spam backlinks to a specific page on our site from porn sites and all sorts of other bad sources. I don’t know what the reason or purpose of this is and whether it is competition trying to harm us or what not.
The result is that it is and has hurt our Google SERPs so we need to do something about it. Right now I’ve created a 301 redirect to a 404 page for this specific page on our site so that it would go through to a 404 Not Found.
I assume the best way is to do a 410 Gone header so that Google would know but I’m not sure so I need your help please.
Since they link to this specific page, the problem seems easy to solve.
What do we do? Where do we redirect to and how do we redirect (which status)?
What is your recommendation?
The most effective way to block spammer/bad bots is to use a firewall that supports intrusion detection, DOS attacks and host filtering.
However you may not have access to such a beast so you can do some things with your .htaccess code.
You can build a list of bad HTTP_REFERERs each being like:
/* check if the referer is a given bad domain */
RewriteCond %{HTTP_REFERER} baddomain1\\.com [COLOR=#464646][OR,NC][/COLOR]
RewriteCond %{HTTP_REFERER} baddomain2\\.com [NC]
/* block them */
RewriteRule .? - [F,L]
You can block bad robots except the ones you want. This is hit or miss as bots don’t always get caught but it can help:
/* If it is the robots text then skip */
RewriteRule ^robots\\.txt - [S=1]
/* If any of these AGENTS and not the search engines then block */
RewriteCond %{HTTP_USER_AGENT} ^$ [OR,NC]
RewriteCond %{HTTP_USER_AGENT} spider [OR,NC]
RewriteCond %{HTTP_USER_AGENT} crawl [OR,NC]
RewriteCond %{HTTP_USER_AGENT} bot [NC]
RewriteCond %{HTTP_USER_AGENT} !(googlebot|bingbot|msnbot) [NC]
RewriteRule .? - [F]