Skip to content
FunnelGuard

Fix guide by FunnelsGuard

SEO spam in title and meta for Google only: find and fix it

OPS-154Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Cloaking means a page returns one version of its HTML to search engine crawlers and another to normal visitors. In a hack, the attacker injects code that checks the visitor's user agent (for example Googlebot) or IP address. If it matches, the code swaps in spam: a casino, pharma or counterfeit-goods title, a changed meta description, or hidden links.

Because you and your customers get the clean version, nothing looks wrong when you open the page. The damage only shows up in Google results, which is why it often goes unnoticed for weeks.

How the cloaked response works
  1. Request arrivesBrowser or Googlebot asks for the page
  2. Injected checkCode tests the user agent or IP
  3. Googlebot gets spamSpam title and meta are returned
  4. Google indexSpam snippet appears in search results

The injected code decides what to send based on who is asking.

Why it costs you leads or sales

People who search for your brand or service see a spammy or off-topic snippet and do not click. Your real title and description, which you wrote to win the click, are replaced. Google may also add a warning, drop pages from results or apply a manual action for spam, which cuts organic traffic to your landing pages and funnels.

Organic clicks to a landing pageExample numbers
Organic clicks to a landing page (example)Before hack: 400 clicks per week; Spam indexed: 150 clicks per week; After clean-up and recrawl: 380 clicks per week0153307400150380Before hackSpam indexedAfter clean-up and re…clicks per week

Example: illustrative numbers showing clicks falling once spam snippets replace the real title.

How to check if your site has it

Compare what Google sees with what you see
  1. Search your own site

    In Google, search site:yourdomain.com and then site:yourdomain.com casino OR pharma OR viagra OR replica. Look for titles or descriptions you did not write.

  2. Run a live URL Inspection

    In Google Search Console, paste the affected URL into the top bar, click Test Live URL, then View Tested Page and open the HTML tab. Search it for the spam title or words.

  3. Fetch the page as Googlebot

    Use curl with a Googlebot user agent and compare it with a normal request. Spoofing the user agent only shows user-agent-based cloaking, not IP-based cloaking, so Search Console is more reliable.

  4. Check Search Console reports

    Open Security & Manual Actions and look for hacked content or spam warnings. Also check Performance for unfamiliar queries bringing impressions.

Compare the title for browsers and Googlebotbash
curl -s https://example.com/ | grep -i '<title'
curl -s -A 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' https://example.com/ | grep -i '<title'

How to fix it

Clean up and close the hole
  1. Back up the site first

    Take a full copy of files and database so you can investigate and roll back if needed.

  2. Find the injected code

    Search files for suspicious patterns such as Googlebot, base64_decode, eval( and gzinflate in theme files, functions.php, index.php, .htaccess and the wp-content/uploads folder. Also check database tables for changed titles, options and widgets.

  3. Remove it and restore clean files

    Replace core files, themes and plugins with fresh copies from trusted sources. Delete unknown files, plugins and admin users.

  4. Close the entry point

    Update everything, remove abandoned plugins, change all passwords (hosting, FTP/SFTP, database, CMS admins) and rotate API keys.

  5. Request re-indexing

    In Search Console, run URL Inspection on key pages and click Request Indexing. If a manual action exists, fix the cause and submit a reconsideration request.

Where to look on your platform
  1. Check SEO plugin and theme

    Review Yoast, Rank Math or similar settings for changed titles. Reinstall WordPress from Dashboard > Updates > Re-install now, and re-upload the theme and plugins from clean copies.

  2. Audit users and plugins

    Under Users, remove unknown administrators. Under Plugins, delete anything you do not recognise or no longer use. Check wp-config.php and .htaccess for added code.

How to confirm it's fixed

Confirmation checks
  • URL Inspection live test shows your real title and description in the rendered HTML
  • Search for unfamiliar spam words in the tested HTML returns nothing
  • The site: search shows correct snippets after recrawling (this can take days)
  • Search Console shows no security issue or manual action
  • No unknown admin users, plugins or files remain

How to prevent it happening again

Hardening checklist
  • Keep CMS, themes and plugins updated and delete unused ones
  • Use unique strong passwords and two-factor authentication for admins and hosting
  • Limit admin accounts and remove old staff or agency users
  • Keep off-site backups so you can restore a clean version
  • Add Search Console users only you trust and enable email alerts
  • Check the Googlebot view of key pages after every major update

How FunnelGuard handles this

FunnelGuard does not check for this yet. Comparing what Googlebot receives with what visitors receive is a possible future check. Today FunnelGuard's robot runs your real customer journeys, such as forms and checkouts, and checks each step and tracking hit, so it only sees what a normal visitor sees. It would not reveal a cloaked title that only Google gets.

To watch for it yourself, check Search Console's Security & Manual Actions report, run a live URL Inspection on your top landing pages after changes, and run a regular site: search for spam words. FunnelGuard can still help nearby: if a hack breaks a form, a tracking tag or a redirect in a funnel, the scheduled journey check will report that failure. You can start with the Free plan (1 site, 2 journeys, daily checks, no card).

Questions people ask

Why does Google show a spam title for my site when my site looks normal?

Your site is probably hacked with cloaking code that sends spam HTML only to Googlebot. Visitors, including you, get the clean page. Use the live test in Search Console's URL Inspection to see the HTML Google receives.

What is cloaking in a website hack?

Cloaking is when a page returns different content to search engine crawlers than to people. Attackers use it to inject spam titles, descriptions and links for Google while hiding them from the site owner.

How do I see my website as Googlebot sees it?

Open Google Search Console, inspect the URL, click Test Live URL and then View Tested Page to see the rendered HTML and screenshot. Curl with a Googlebot user agent can help, but it misses cloaking based on IP address.

How do I remove spam meta descriptions from Google search results?

Remove the injected code and close the entry point, then request indexing for affected URLs in Search Console. Google updates snippets after it recrawls the pages, which can take days or weeks.

Can a plugin or theme cause cloaked SEO spam?

Yes. Outdated, nulled or abandoned plugins and themes are common entry points. Replace them with clean copies from official sources and delete anything you do not use.

Does FunnelGuard detect cloaked SEO spam?

No. FunnelGuard does not check for this yet; it could be a future check. It tests your real funnel steps as a normal visitor, so use Search Console and site: searches to watch for cloaking.

Will a manual action be applied if my site is cloaking spam?

It can be. Google may apply a manual action for hacked or spammy content, shown in Search Console under Security & Manual Actions. After cleaning the site you can submit a reconsideration request.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.