Cloaking in SEO: Google's Spam Policy, Examples, Detection and AI Crawlers
Cloaking in SEO is showing search engines different content than people see, to manipulate rankings. Google's spam policy bans it, together with hidden text such as white-on-white keywords. The same trick aimed at AI crawlers, a page only GPTBot or ChatGPT receives, is still cloaking, and Google's policy now covers attempts to manipulate its generative AI answers.
By Raúl Díaz, founder of Slibur
12 min read

In this article
Not every case is deliberate. Hackers use cloaking precisely because the owner browsing the site sees nothing wrong, and a misconfigured CDN or rendering setup can produce a version of a page that only bots receive. So the useful questions are three: what exactly the rule says, how to check a site, and where the line sits now that AI crawlers read the web too.
What Google's spam policy says about cloaking
Google's spam policies for web search (opens in a new tab) define the practice in one sentence:
"Cloaking refers to the practice of presenting different content to users and search engines with the intent to manipulate search rankings and mislead users."
The policy gives two examples: showing search engines a page about travel destinations while users get a page about discount drugs, and inserting text or keywords into a page only when the user agent requesting it is a search engine. It adds that hacked sites often use cloaking to make the hack harder for the owner to spot.
Intent is the key word. Two responses that differ are not automatically spam; two responses that differ so a crawler ranks a page people would not choose are. In the current version of the policy, last updated on August 28, 2026, the introduction also defines spam as including "attempting to manipulate generative AI responses in Google Search." AI Overviews and AI Mode sit inside the rule, not beside it.
Enforcement works in two layers. Google says it detects violations through automated systems and, as needed, human review that can end in a manual action, and that violating sites "may rank lower in results or not appear in results at all." The list is not closed either: Google may act against any type of spam it detects.
What counts as hidden text and links
Hidden keywords are the oldest version of the trick: same response for everyone, but part of it invisible to people. Google calls it hidden text or link abuse, "placing content on a page in a way solely to manipulate search engines and not to be easily viewable by human visitors." Its examples:
- white text on a white background
- text hidden behind an image
- CSS that positions text off-screen
- a font size or opacity of 0
- a link on a single small character, such as a hyphen in the middle of a paragraph
What Google explicitly does not treat as a violation matters just as much, because most modern pages hide something:
- accordion or tabbed content that toggles between hiding and showing
- slideshows and sliders that cycle through images or text
- tooltips that show more content when a user interacts with an element
- text only screen readers can reach, meant to help people who use them
The difference is who the hidden part is for. An FAQ answer behind a click is there for readers. A block of city names in a collapsed div that never opens is there for Googlebot, and it overlaps with keyword stuffing, which Google defines separately as filling a page with keywords or numbers to manipulate rankings, often in lists or out of context.
The close relative: sneaky redirects
Redirects become spam when they are used to show users and search engines different content. Google's examples are a crawler that gets one page while users are sent somewhere significantly different, and desktop users who see a normal page while mobile users are redirected to a spam domain. Moving a site, merging pages or sending people to an internal page after login are all fine.
Cloaking examples, from old tricks to AI agents
Every technique below does the same thing: it decides who is asking, then picks the answer.
| Technique | How the server decides | Typical example |
|---|---|---|
| User-agent cloaking | Reads the User-Agent header and recognizes a crawler | Extra keyword text added only when the request says Googlebot |
| IP-based cloaking | Matches the visitor's IP against known crawler ranges | A travel page for crawlers, a pharmacy page for people |
| Sneaky redirects | Redirects some visitors, often only on mobile or only from search | Crawler sees the article, phones land on a spam domain |
| Hacked-site cloaking | Injected code shows spam only to crawlers | Spam pages indexed in Google that the owner never sees |
| AI-targeted cloaking | Checks for agents such as ChatGPT-User or PerplexityBot | A normal portfolio for people, a fabricated profile for AI tools |
The last row is not hypothetical. It comes from a published experiment covered further down.
One case looks similar and is not cloaking in the spam sense: a firewall or CDN rule that answers AI crawlers with a challenge page or an error. Nobody is being deceived, but the effect on AI answers is close, because the crawler reads a page your visitors never see. Slibur's free AI crawler checker shows whether GPTBot, ClaudeBot, PerplexityBot and other AI crawlers can read a site.
What is not cloaking
Google's documentation carves out several setups that serve different responses for legitimate reasons. Each one has a condition attached.
- Paywalls and gated content. Not cloaking if Google can see the full content behind the paywall, just like anyone with access, and you follow the Flexible Sampling guidance. Google also asks publishers to mark paywalled sections with structured data so it can tell them apart from cloaking.
- Dynamic rendering. Serving crawlers a prerendered HTML version of a JavaScript page is generally not cloaking "as long as your dynamic rendering produces similar content." Google's dynamic rendering page (opens in a new tab) gives the counterexample in plain words: cats for users and dogs for crawlers is cloaking. It also calls dynamic rendering a workaround, not a long-term solution, and recommends server-side rendering, static rendering or hydration instead.
- Country and language versions. Googlebot's default IP addresses appear to be in the USA, and it sends requests without an Accept-Language header. Google's rule is to treat Googlebot like any other user from the country it appears to come from, and to use separate URLs with hreflang rather than one URL that changes by location. The international SEO audit covers how to check that setup.
- A/B tests. Testing is fine; showing Googlebot one set of URLs and humans another is not. Google is direct that cloaking counts whether you do it by server logic, by robots.txt or by any other method, and that Googlebot generally does not support cookies, so it sees the version shown to browsers without them.
- Mobile layouts. Slightly different content on different devices is normal. Redirecting mobile users to unrelated content is a sneaky redirect.
The test that runs through all of them: would a person with the same access, location and device get the same substance Google got?
How to detect cloaking and hidden text on a site
No single check catches every variant, because each technique hides from a different test. Run them in this order.
Compare what Google stored with what you see
Open Search Console, inspect the URL and look at two things. The indexed result (View crawled page) shows the HTML Google kept from its last crawl. The live test (View tested page) shows a screenshot and the HTML as Google's inspection tool sees the page now. If either one contains text, links or redirects you don't see in your own browser, something is serving crawlers a different page.
Fetch the page as a bot, and know the limit
A quick terminal check catches user-agent cloaking:
curl -sL -A "Mozilla/5.0" https://example.com/page -o as-person.html
curl -sL -A "Googlebot" https://example.com/page -o as-googlebot.html
diff as-person.html as-googlebot.html
Repeat it with GPTBot, OAI-SearchBot and ChatGPT-User as the user agent. The limit: this only changes the header. If the cloaking keys on IP address, your request still comes from your own IP and gets the human version, which is why the Search Console comparison comes first.
Verify who your server is actually talking to
Server logs show which pages crawlers requested and how big the responses were. A crawler that consistently gets a different response size than people do is worth a look. Before trusting a log line that says Googlebot, verify the request (opens in a new tab): run a reverse DNS lookup on the IP, check that the name ends in googlebot.com, google.com or googleusercontent.com, then run a forward lookup and confirm it returns the same IP. OpenAI publishes IP lists for its crawlers for the same purpose.
Find hidden text
Google's own tip for the hidden text manual action is simple: select all the text on the page with Ctrl + A or Command + A, which often reveals text in the same color as the background. Then check for text hidden with CSS styling or positioning, for paragraphs of repeated words without context, and for title tags and alt text stuffed with the same strings.
Check for a hack
If you find cloaking you didn't build, treat it as a security problem first. Look at the Security Issues report in Search Console, audit third-party scripts, and review the .htaccess file and any JavaScript, where Google says these redirects are often written, plus your CMS and its plugins. Once the site is clean, a free GEO audit checks the homepage, robots.txt, sitemap and llms.txt, the files crawlers read first.
AI crawlers: why a bot-only version is still cloaking
AI assistants fetch pages too, and the incentive to show them something special is obvious: an AI answer that recommends your product is worth more than a ranking. The mechanics are the same as classic cloaking, and so is the problem.
Who is visiting: OpenAI's three agents
OpenAI's crawler documentation (opens in a new tab) lists separate agents with separate jobs. OAI-SearchBot surfaces sites in ChatGPT's search features. GPTBot crawls content that may be used to train its foundation models. ChatGPT-User visits a page when a person's question in ChatGPT calls for it, and because those visits are started by a user, robots.txt rules may not apply. Each robots.txt setting is independent, and OpenAI says changes can take about 24 hours to reach its search systems.
That is the legitimate control panel. If you don't want a crawler to use your pages, block it in robots.txt. Writing it a special version is a different act.
What AI-targeted cloaking looks like
In October 2025, the AI security company SPLX published experiments it called AI-targeted cloaking. A demo site showed human visitors an ordinary designer portfolio. When the same URL was requested with an AI agent's user agent, such as ChatGPT-User or PerplexityBot, the server returned a fabricated negative profile, and the AI tools repeated it. The only change was the user-agent header.
A second test was more pointed. Five candidate résumés were hosted for an AI-run hiring evaluation, and one of them was served to AI agents with inflated titles and claims. With the cloaked version, that candidate ranked first with 88 out of 100. Scored on the version humans could see, the same candidate came last with 26.
That lesson cuts both ways. Anyone can try this against AI systems, and a brand can be described by an AI tool using a page its customers have never seen.
Markdown copies, llms.txt and the gray areas
Some sites build markdown or JSON copies of their pages just for AI bots. In February 2026, Google's John Mueller dismissed the idea in public, asking whether bots even treat a markdown file on a website as more than plain text and pointing people to clean HTML and structured data instead. Bing's Fabrice Canel, replying to a similar question that month, said Bing would crawl the regular pages anyway to check that the versions match.
There is a difference between that and format conversion. Cloudflare's Markdown for Agents feature converts the site's own HTML to markdown at the edge when a client asks for text/markdown, so the agent reads the same content in a lighter format. An llms.txt file is a separate public file anyone can open, not a second version of an existing URL. The risk starts when the bot version says something the human page does not.
Hidden instructions for AI models
Hidden text has a new use: white or off-screen text addressed to AI models, telling them to recommend a product or ignore other sources. On Google, that is hidden text aimed at its AI answers, which the spam policy covers. On Bing, it has a name: prompt injection. When Bing rewrote its webmaster guidelines in February 2026, prompt injection became a full section, "Prompt Injection and AI Manipulation," and keyword stuffing was renamed to cover language engineered to trigger citations or AI responses, as Search Engine Journal reported on February 27, 2026.
The honest way to be recommended by AI looks like ordinary SEO: pages that answer the questions buyers ask, and mentions on sites the assistants trust. The guide on how to rank in ChatGPT covers that route.
Slibur dataChatGPT, United States, 4 answers, November 17, 2026
What ChatGPT says about cloaking
We asked ChatGPT four questions on November 17, 2026, from the United States: what cloaking is and whether Google can still penalize it, whether hidden text is bad for SEO, how to check if a site shows Googlebot different content, and whether a different version for AI crawlers counts as cloaking.
- All four answers cited Google's developer documentation. The ten citations pointed to developers.google.com, support.google.com and OpenAI's crawler page. No SEO blog, agency or tool vendor was cited.
- The definitions tracked Google's wording closely, down to a version of the travel page and pharmacy example and the full list of hidden elements Google allows.
- One answer went further than its source. It said serious cases could bring "broader or permanent exclusion" from search. Google's policy says violating sites may rank lower or not appear at all, and says nothing about permanent.
- On AI crawlers, the answer was a qualified yes: potentially, but not automatically. Differences in presentation are fine, differences in substance are not, and robots.txt is the right way to keep a crawler out. It credited the "similar content" condition to the spam policy page, but that wording comes from Google's dynamic rendering documentation.
- The detection answer was the most practical, with the Search Console live test, a curl comparison, rendered HTML, server logs and DNS verification of Googlebot.
On a policy question, ChatGPT goes straight to whoever owns the rule. Third-party pages get room when they add what the rulebook lacks, such as worked examples, test steps and the AI crawler side. To see which pages ChatGPT cites for a question in your own market, try the free ChatGPT sources check.
If Google has already flagged your site
Cloaking and hidden text each have their own manual action in Search Console: "Cloaking and/or sneaky redirects" and "Hidden text and/or keyword stuffing." The Manual Actions report help page (opens in a new tab) lists the fix for each, and the steps are short.
- Fetch the affected pages with the URL Inspection tool and compare them with what a person sees.
- Remove the code serving different content or conditional redirects, which usually means reading the server code, the .htaccess file, the CMS and its plugins.
- Fix every affected page. Google says fixing only some of them will not earn a partial return.
- Make sure Google can reach the pages without a login, a paywall, a robots.txt block or noindex.
- Select Request Review and describe the problem, the fix and the result.
Most reconsideration reviews take several days or weeks, and Google asks site owners not to resubmit while one is pending.
The rule that covers every case
Strip away the techniques and one question is left: does the crawler get the same substance a person with the same access would get? If yes, the formatting, rendering and device differences are fine. If no, it is cloaking, whether the crawler belongs to Google, Bing or an AI company.
The AI side is harder to watch, because you can't open a search result to see what an assistant read. What you can see is what it says. Slibur asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask, and shows which brands appear, in what position and which sources each answer cites, with the full answer for each. An AI visibility tool like that is how a description that doesn't match your pages gets noticed. You can test it on your own questions for 7 days without a card: start the free trial.
Frequently asked questions
What is the difference between cloaking and hidden text?
Cloaking sends different responses depending on who asks: one page for the crawler, another for people. Hidden text sends everyone the same page but makes part of it invisible to humans, with white-on-white text, off-screen CSS or a font size of 0. Google treats both as spam when the goal is to manipulate rankings, and each has its own manual action in Search Console.
Are accordions, tabs and "read more" sections hidden text?
No. Google's spam policy lists accordion and tabbed content, sliders, tooltips and text meant for screen readers as design patterns that don't violate its policies. The difference is purpose: content a reader can open is there for readers, while text nobody can ever reach is there for the crawler.
Is a paywall cloaking?
Not if Google can see the full content behind the paywall, just like anyone with access, and you follow Google's Flexible Sampling guidance. Google also asks publishers to mark paywalled sections with structured data, which helps it tell paywalled content apart from cloaking.
Can Google detect cloaking?
Google says it finds spam through automated systems and, when needed, human review that can lead to a manual action. Googlebot also crawls from IP addresses outside the USA, not only US ones, so a rule that only checks for one location or one user agent is not a safe bet. Sites that violate the policy may rank lower or drop out of results entirely.
Is it cloaking to block AI crawlers like GPTBot?
No. Blocking a crawler in robots.txt is the documented way to opt out, and OpenAI lets you allow or block OAI-SearchBot and GPTBot independently. What crosses the line is serving a crawler a different version of the page than people see. Note that ChatGPT-User visits are started by a person, so OpenAI says robots.txt rules may not apply to them.
How long does it take to recover from a cloaking manual action?
Fix every affected page first, because Google says a partial fix won't earn a partial return. Then request a review in the Manual Actions report. Google says most reconsideration reviews take several days or weeks, and asks you not to resubmit while one is pending.

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.