# Cloaking

> Cloaking means showing search engines different content than users to manipulate rankings. What Google

Canonical: https://scaplet.com/glossary/cloaking

Glossary Glossary · Quality and policies

Cloaking means showing search engines different content than users to manipulate rankings. What Google's spam policy says, what isn't cloaking, and how to check.

4 min

read

2

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

Cloaking is the practice of presenting different content to users and search engines with the intent to manipulate search rankings and mislead users. It is listed in Google's spam policies, and Google says sites that violate its policies may rank lower in results or not appear in results at all.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcloaking%20(%22Cloaking%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcloaking%20(%22Cloaking%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcloaking%20(%22Cloaking%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fcloaking%20(%22Cloaking%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 6 parts, 4 minutes.

1. [What cloaking is 01](#what-cloaking-is)
2. [Common cloaking techniques 02](#common-cloaking-techniques)
3. [What Google says happens 03](#what-google-says-happens)
4. [What isn't cloaking 04](#what-isn-t-cloaking)
5. [How to avoid cloaking 05](#how-to-avoid-cloaking)
6. [Detecting cloaking on your site 06](#detecting-cloaking-on-your-site)

_01_Explained

## What cloaking is

Google's spam policies define cloaking as "the practice of presenting different content to users and search engines with the intent to manipulate search rankings and mislead users." The definition includes intent to manipulate rankings and mislead users.

Google lists two examples. One is showing a page about travel destinations to search engines while showing a page about discount drugs to users. The other is inserting text or keywords into a page only when the [user agent](/glossary/user-agent) requesting the page is a search engine, not a human visitor.

_02_At a glance

## Common cloaking techniques

Cloaking depends on telling search engines and people apart, then returning different content. Google's second example describes checking the user agent making the request. These are the two examples from Google's policy.

Technique

### Different page for crawlers

Method

Show a different page to search engines than to users

Example

Travel destination content for search engines, discount drug pages for users

Technique

### Text only for crawlers

Method

Insert text or keywords only when the requesting user agent is a search engine

Example

Keyword text that real visitors never see

Illustrative cloaking pattern (do not use)

```
// Detecting crawler and serving different content if (navigator.userAgent.indexOf('Googlebot') !== -1) { // Serve crawler-targeted content document.body.innerHTML = 'Keyword-stuffed content'; } else { // Serve content to real users document.body.innerHTML = 'Actual website content'; }
```

_03_Good to know

## What Google says happens

Google says sites that violate its spam policies "may rank lower in results or not appear in results at all." Google detects violations through automated systems and, as needed, human review that can result in a [manual action](/glossary/google-penalty).

Check manual actions

Google's spam policies mention the Manual actions report and the [Search Console](/glossary/google-search-console) message center as places it notifies affected sites, in the context of its [site reputation abuse policy](/glossary/site-reputation-abuse). If you suspect a manual action, check both.

_04_Explained

## What isn't cloaking

Google's policy carves out paywalls. Content behind a paywall is not cloaking if Google can see the full content just like any person who has access to the gated material, and you follow Google's Flexible Sampling guidance.

Google's definition turns on presenting different content to users and search engines with the intent to manipulate search rankings and mislead users.

_05_How it works

## How to avoid cloaking

1. 1

### Serve the same main content to everyone

Don't branch on the [Googlebot](/ai-crawlers/googlebot) user agent to change the main content of a page.
2. 2

### Keep keywords visible

Don't insert text or keywords that only search engines get.
3. 3

### Make JavaScript and image content accessible

If your site uses technologies search engines have difficulty accessing, like JavaScript or images, Google has recommendations for making that content accessible to search engines and users without cloaking.
4. 4

### Check for hacked or injected code

Google notes that if a site is hacked, it's not uncommon for the hacker to use cloaking to make the hack harder for the site owner to detect. Check plugins and scripts you don't recognize.
5. 5

### Gate content the documented way

If you use a paywall, follow Google's Flexible Sampling guidance.

_06_How it works

## Detecting cloaking on your site

If you suspect a plugin, hacked page or script is serving crawlers something different, compare what a browser sees with what Googlebot sees.

1. 01

### Inspect the URL in Search Console

Use the [URL Inspection tool](/glossary/url-inspection-tool) in Search Console to see the page as Google fetches it. Google's crawler documentation says its Google-InspectionTool user agent is used by Search testing tools such as the Rich Results Test and URL inspection.
2. 02

### Compare it with your browser

Open the same page normally. Significant differences in main text, links or redirects need an explanation.
3. 03

### Try a crawler user agent

Run `curl -s -A "Googlebot" https://example.com/ > bot.html` and `curl -s https://example.com/ > user.html`, then `diff bot.html user.html`. This only catches differences keyed on the user-agent string.
4. 04

### Search your code for user-agent checks

Look for `Googlebot`, `bingbot` and `User-Agent` in templates, server config and plugins. Any branch that changes main content by visitor type needs review.

Sources · 2

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com

1. 01 [Spam policies for Google web search](https://developers.google.com/search/docs/essentials/spam-policies) developers.google.com · checked 2026-10-24
2. 02 [Google common crawlers](https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ Is cloaking ever acceptable?

Not as Google defines it: presenting different content to users and search engines with the intent to manipulate rankings and mislead users is listed as spam. Google says it doesn't consider a paywall or content-gating mechanism to be cloaking if Google can see the full content behind it just like any person who has access, and you follow Flexible Sampling.

_02_ Can a site recover after cloaking?

Google's spam policies page describes reconsideration requests in its site reputation abuse section but gives no recovery steps for cloaking, so follow Search Console's manual action help. Remove the cloaking first and confirm the page is the same for crawlers and users.

_03_ Is showing different content to logged-in users cloaking?

Google's policy addresses paywalls and content-gating: it isn't considered cloaking if Google can see the full content behind the gate just like any person who has access, and you follow Flexible Sampling. Showing crawlers something different to manipulate rankings is what the policy targets.

## Keep learning

[All glossary](/glossary)

[Learn Black hat SEO Quality and policies](/glossary/black-hat-seo) [Related User agent Crawling and indexing](/glossary/user-agent) [Read next Dynamic serving Crawling and indexing](/glossary/dynamic-serving) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Click-through rate](/glossary/click-through-rate) [Client-side rendering](/glossary/client-side-rendering) [Competitor analysis](/glossary/competitor-analysis)

More in Quality and policies
[Negative SEO](/glossary/negative-seo) [Panda update](/glossary/panda) [Penguin update](/glossary/penguin) [Scaled content abuse](/glossary/scaled-content-abuse) [Search Quality Rater Guidelines](/glossary/search-quality-rater-guidelines) [Site reputation abuse](/glossary/site-reputation-abuse) [User-generated content](/glossary/user-generated-content) [White hat SEO](/glossary/white-hat-seo) [YMYL](/glossary/ymyl) [AI-generated content](/glossary/ai-generated-content) [Black hat SEO](/glossary/black-hat-seo) [Brand authority](/glossary/brand-authority) [Cloaking](/glossary/cloaking) [Comment spam](/glossary/comment-spam) [Core update](/glossary/core-update) [Domain age](/glossary/domain-age) [Doorway pages](/glossary/doorway-pages) [E-E-A-T](/glossary/e-e-a-t) [Expired domain](/glossary/expired-domain) [Google penalty](/glossary/google-penalty) [Google spam policies](/glossary/spam-policies) [Gray hat SEO](/glossary/gray-hat-seo) [Helpful content update](/glossary/helpful-content-update) [Link spam](/glossary/link-spam)

Terms on this page
[User agent](/glossary/user-agent) [Google penalty](/glossary/google-penalty) [Google Search Console](/glossary/google-search-console) [Site reputation abuse](/glossary/site-reputation-abuse) [URL Inspection tool](/glossary/url-inspection-tool)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
