Cyber Security SpaceCYBERSECURITYSPACE.NET
Community
Community HubEventsNewsletterSubmit a Tool
Careers
JobsCareer GuidesFor ProfessionalsCertifications
Learn
Learning PathsEducationGuidesGlossaryTools
News & Threats
NewsBlogThreat LibraryCrypto Security
Small Business
Security CheckupSecurity GuidesComplianceIncident ResponseSecurity Monitor
Join the community
Cyber Security Space

A community for cybersecurity professionals and enthusiasts: careers, learning, and people to learn with. Practical guidance for small businesses too.

Small Business

  • Security Checkup
  • Security Checklist
  • Security Guides
  • Templates
  • Security Tools

Security

  • Website Security
  • Incident Response
  • Compliance
  • Threat Library
  • Crypto Security

Resources

  • Resources
  • News
  • Blog
  • Glossary
  • Jobs
  • Learning

Company

  • About
  • Sources
  • Contact
  • Privacy Policy
  • Terms
  • Disclaimer
  • Editorial Policy
© 2026 Cyber Security Spacecybersecurityspace.net

Guides

How to Detect SEO Spam on Your Website

A repeatable detection routine: search-side checks first, then crawler-view comparison, then file and database review.

Published 9 Jul 2026 · Updated 26 Aug 2026 · 2 min read

Short answer

To detect SEO spam, start outside your site: compare the number of indexed URLs in Search Console against your real page count, run a site: query looking for titles you never wrote, then fetch suspect pages with a crawler user agent and diff the response against a normal browser request. Only after that do you search files and database content for the injected code.

Step 1 — Check what search engines have indexed

  • Open Search Console → Pages and compare indexed URLs against your sitemap count.
  • Run site:yourdomain.com and page deep into the results, not just page one.
  • Look for languages you do not publish in, and for directories your CMS does not create.
  • Review Settings → Users and permissions for owners you did not add.

Step 2 — Compare the crawler view with the visitor view

Injected spam is normally cloaked. Fetch a suspect URL twice — once with a browser user agent, once with a crawler user agent — and diff the HTML. Then use Search Console's URL inspection to see the version Google actually received, which defeats IP-based cloaking that a spoofed user agent misses.

curl -s -A "Mozilla/5.0" https://example.com/page > visitor.html
curl -s -A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" https://example.com/page > crawler.html
diff visitor.html crawler.html

Step 3 — Audit outbound links and hidden content

  • Extract external links from templates and compare against domains you intentionally link to.
  • Look for anchors with zero size, hidden visibility, or large negative offsets.
  • Check footers, widget areas and sidebar templates first — they render on every page.

Step 4 — Search files and stored content

  1. STEP 01

    Find recently modified files

    List files in the web root by modification time. Clusters of changes on one date usually mark the injection.

  2. STEP 02

    Look for obfuscation

    Grep for base64_decode, eval, gzinflate and long encoded strings in PHP files.

  3. STEP 03

    Query the database

    Search post content, options and metadata for script tags and unfamiliar domains.

  4. STEP 04

    Check scheduled tasks

    Review cron jobs and CMS scheduled events used to reinstate deleted files.

What do you do once you find spam?

Treat it as a compromise, not a content issue. Take a forensic copy, remove the injected content, close the entry point, rotate every credential, then serve 404 or 410 for the spam URLs and resubmit your real sitemap. Re-check indexed page counts weekly for a month.

Sources

  • Fixing hacked sites: hacked with spam — Google Search Central
  • URL Inspection tool — Google Search Central

Prefer summary updates? Subscribe to the newsletter.

On this page

  • Step 1 — Check what search engines have indexed
  • Step 2 — Compare the crawler view with the visitor view
  • Step 3 — Audit outbound links and hidden content
  • Step 4 — Search files and stored content
  • What do you do once you find spam?