A common trick for spammers is to inject pages into sites belonging to someone else. If vulnerabilities are present, pages are easily inserted into a siteÂ without the site owner knowing. As a result of injecting these pages, the spammer can get dozens or hundreds of new pages into the Google index; pages with links to their own sites, or to their client’s sites. The presence of these pages can have a number of negative effects on your site. They slow down your site. They make your site look less legitimate. They can affect your own ranking and search appearance in Google results. The list goes on.
If you find yourself in this situation, it can be very difficult to get these spammy links removed from the Google index. You can clean up your site until the cows come home but the links will stay in Google for a long time. If your site is clean, clicking on the links will take the user to a 404 page on your site (provided you have one) but the links will still exist in Google’s results and will continue to negatively effect your site.
Fortunately, Google offers a way to remove or hide these links via their Google Search Console. If you only have a few pages injected, this is great. However, since the spammers have automated systems to carry out their evil deeds, you likely have dozens or hundreds of these pages.
Thanks to a couple handy Google Chrome extensions, requesting removal of a large number of spammy search results is much, much easier than manually entering dozens of URLs.
Scraper: Use the “Scraper” Chrome extension to scrape the spammy URLs from Google search results.
- Go to google the search page and perform a search that shows the spammy links; a search such as site search for viagra, cialis, etc. . For example, “site:mysite.com viagra”. (You may first want to Increase The Number of Results Displayed by Google)
- Right click on the first result
- Click on “Scrape similar” optionÂ that the extension has added to your right click menu
- On the left side of the window that appears, set the scraper results to only show columns for @href URL
- Hit the Scrape button again
- Click the ‘Copy to clipboard’ button at the bottom right
- Paste the contents of the clipboard into a text editor and save it as a plain text Â file(there should be one URL per line)
Next, use the “WebMaster Tools – Bulk URL removal“Â Chrome extension to set the URLs for removal in Google Search Console.
- Go to Google Search Console
- Click on Google Index -> Remove URLs
- You should now see a new “Choose File” button
- Click on the Choose File button
- Select the file of URLs you created in the first part
After you choose the file, the extension will go to work, automatically submitting all of the spammy URLs in your file.
As usual with this feature in Google Search Console, the ‘removed’ URLs will not disappear immediately from the Google search results. It can often take up to two weeks for them to go away.
Important Extra Tip: after all of the links have been submitted, be sure to scan the list to ensure there are no mistakes. Sometimes parsing errors can occur and your domain name itself can be submitted. If you don’t cancel this, your entire site will be de-indexed!