Background
The client provides staffing and outsourcing services. Its website had been compromised, and search engines were indexing hundreds of spam pages under its domain.
Challenge
- Injected spam pages were being served to search engine crawlers.
- Search Console impressions were inflated by queries unrelated to the business.
- The robots.txt file and XML sitemap no longer described the real site.
- Neither Google Search Console nor Yandex Webmaster had been set up properly, so nobody could see the damage.
Objectives
- Remove the infection completely.
- Get the spam URLs out of search indexes as quickly as possible.
- Restore accurate crawling instructions and monitoring.
What we did
- Audited the server files and removed 64 malicious objects.
- Configured the spam URLs to return 410 Gone, which tells search engines the pages were removed deliberately and will not return.
- Rebuilt robots.txt and the XML sitemap so they list only real pages.
- Set up and verified Google Search Console and Yandex Webmaster.
- Verified the fix by requesting pages as Googlebot and YandexBot, because injected spam is often shown only to crawlers.
Deliverables
- A cleaned site with the infection removed
- 410 handling for every known spam URL pattern
- New robots.txt and XML sitemap
- Configured webmaster tools and a monthly report
Results
The cleanup was verified with crawler user agents. Search Console impressions fell after the cleanup because spam impressions disappeared; that is the intended outcome of removing spam, not a loss of real visibility.
No growth figures are reported. The project's ranking measurements for target queries had only just begun when this case study was written.
Lessons
Always test a suspected hack as a crawler, not only in a browser: many injections show clean pages to visitors and spam to search engines. Returning 410 rather than 404 makes the intent explicit.
See our technical SEO service and the technical SEO audit checklist.




