SEO

Cloaking

Also called cloaked content

Showing search engines different content or URLs from what human visitors see, in order to manipulate rankings. It breaks Google's spam policies.

Quick facts: Cloaking

Category
SEO
Also called
cloaked content
Level
Intermediate
Affects
Manual actions, rankings, whole-site visibility, brand reputation, visitor security
Where to see it
Google Search Console URL Inspection, Manual actions and Security issues reports, site: searches, server logs, a malware scanner
In this article4
  1. How cloaking works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Cloaking is the practice of showing search engines different content from what human visitors see, with the aim of ranking for something the page does not really offer. Google treats it as a breach of its spam policies, and a site caught doing it can lose rankings or be removed from results.

How cloaking works

A cloaked site checks who is asking for the page before deciding what to send. It might look at the user agent (the name a browser or crawler gives itself, such as Googlebot), at the IP address the request comes from, or at the referring page. If the request looks like a search engine, the server returns one version, often stuffed with keywords or written on a different subject. If it looks like a person, it returns something else.

Typical examples include a page that shows Google a long article about holiday lettings while visitors see a casino sign-up form, text that is only included when the request comes from a crawler, and a JavaScript redirect that sends people to a different site while crawlers stay on the original page.

Much of the cloaking found on small business sites today was not put there by the owner. Hacked WordPress sites are commonly injected with code that shows Google pages of spam about pharmaceuticals, replica goods or gambling, often in Japanese, while the owner browsing normally sees nothing wrong. The hack is designed to stay hidden from the one person most likely to fix it.

Why it matters

Google’s view is simple: the searcher should get what the result promised. When its systems or reviewers find cloaking, the usual outcome is a manual action in Search Console, which can affect individual pages or the whole site, followed by a reconsideration request once it is cleaned up. Algorithmic spam systems can demote a site without any notice at all.

For a business that did not know it was happening, the damage arrives twice: traffic falls, and the brand name appears next to spam in search results, which puts off customers. The cloaked pages can also be used to attack visitors.

Not every difference between users counts as cloaking. Adapting layout to mobile, showing prices in pounds to UK visitors or personalising a greeting is fine, provided Googlebot is treated like a normal visitor in the same situation. Paywalled content that is marked up correctly with structured data is also accepted. One UK-specific trap: Googlebot mostly crawls from US addresses, so a site that redirects or blocks visitors from outside the UK can accidentally hide itself from Google.

Common mistakes

  • Only checking the site in your own browser. Hacks often hide from logged-in admins and visitors who do not arrive from Google.
  • Serving bots a different “SEO version”. Old advice about giving crawlers keyword-rich text and humans a slick design is exactly what the policy forbids.
  • Hiding text instead. White-on-white text or content placed off-screen to influence rankings is a close relative of cloaking, and Google’s spam policies forbid it too.
  • Cleaning up without finding the cause. Removing spam pages but leaving the vulnerable plugin in place usually means the hack returns.

How to act on it

Search Google for site:yourdomain.co.uk and scroll through the results looking for pages or titles you did not create. Use the URL Inspection tool in Search Console to see the HTML Google received for your main pages, and compare it with what you see in the browser. Check the Security issues and Manual actions sections of Search Console, which is where Google reports hacked content and cloaking.

If something is wrong, take a backup, update WordPress, themes and plugins, remove unknown admin users, scan the files for injected code and rotate every password. Then request a review in Search Console. Cloaking is one of the black hat SEO tactics I check for in every SEO audit, because a hack that only shows to Google can go unnoticed for months.

Do and do not

Do

  • Compare what Google receives with what visitors see
  • Check Search Console for security issues regularly
  • Keep your CMS, themes and plugins updated

Do not

  • Serve crawlers a separate keyword-rich version of pages
  • Block or redirect US visitors without checking Googlebot
  • Clean up a hack without closing the way in

Questions people ask about this

Is showing different content to mobile and desktop users cloaking?

No. Adjusting the layout or presentation for different devices is normal, and Google expects responsive and mobile-friendly design. It becomes cloaking only when search engines are shown something materially different from what a visitor in the same situation sees. If Googlebot on a smartphone sees what a smartphone visitor sees, you are fine.

How do I know if my site has been hacked with cloaked content?

Search Google for site:yourdomain.co.uk and look for pages, titles or languages you do not recognise, and check the Security issues report in Search Console. Use URL Inspection to see what Google receives for your pages. Spam that appears in Google but not when you visit the site yourself is a strong sign of a cloaking hack.

Can my site recover from a cloaking penalty?

Usually, yes, once the cloaking is fully removed and the cause fixed. If there is a manual action, clean the site, then submit a reconsideration request in Search Console explaining what happened and what you changed. Recovery can take weeks, and rankings may not return straight away to where they were.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.