In short
Misleading content aimed at bots is information that a site reserves for the programs that read it (search engine crawlers, AI assistants' crawlers, browsing agents) and that does not match what a visitor sees: a version of a page served only to AI crawlers, a block of text reserved for bots, a Markdown version or llms.txt that claims something other than the page, structured data with no visible equivalent, orphan pages written for AI. This check consists in comparing what bots and humans receive, finding the rules that create the gap and removing them. Once it is done, a bot and a visitor receive the same information, whatever the format.
Why it matters
Classic cloaking targeted Googlebot. With assistants, the same idea has resurfaced in a new form: serving OpenAI's, Anthropic's or Perplexity's crawlers a flattering version of the page, more assertive, more complimentary, or without the awkward information.
Search engines penalize it. Google defines cloaking as presenting different content to users and to search engines, and cites inserting text or keywords only when the requester is a search engine. Its spam policies state that they also target attempts to manipulate generative AI answers in its Search. Its structured data guidelines ask you not to mark up content that is invisible to the reader.
Researchers have demonstrated it, and assistants fall for it. In October 2025, the security company SPLX described “AI-targeted cloaking”: a server that detects the user agent of an AI crawler or agent and returns a different page to it. In its tests, OpenAI's Atlas browser and other tools repeated as facts the information from the version reserved for bots. In other words, the technique sometimes works, and that is what makes it dangerous: the assistant's answer contradicts what the user sees when clicking through.
The contradiction comes at a price. A prospect told “no commitment” by the assistant who then reads “12-month commitment” on the page no longer trusts either of them. If the version reserved for bots contains false marketing claims, it is still the brand's commercial communication, with the same legal risks as misleading advertising.
Detection is easy. Anyone can request your page while presenting themselves as GPTBot. A version for bots does not stay hidden for long.
What it improves
- Compliance Removes a cause of manual action for cloaking or for misleading structured data.
- Consistent AI answers What assistants say matches what users find on the page. Plausible effect; no practice guarantees a citation or a recommendation.
- Trust No contradiction discovered by a customer, a competitor or a journalist.
- Maintenance A single version of the content to keep up to date instead of two.
- Rankings No direct gain, except when a manual action is lifted.
How to check
1. Compare responses by user agent. This dependency-free Python 3 script requests a page as a browser and then as several bots, extracts the visible text and measures how similar they are. Save it as comparer-robots.py:
import difflib, re, sys, urllib.error, urllib.request
BROWSER = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0 Safari/537.36"
BOTS = ["Googlebot/2.1", "bingbot/2.0", "GPTBot/1.0", "OAI-SearchBot/1.0", "ChatGPT-User/1.0",
"ClaudeBot/1.0", "Claude-User/1.0", "PerplexityBot/1.0", "Perplexity-User/1.0"]
def text(url, agent):
request = urllib.request.Request(url, headers={"User-Agent": agent})
try:
html = urllib.request.urlopen(request, timeout=20).read().decode("utf-8", "replace")
except urllib.error.HTTPError as error:
return f"HTTP {error.code}"
html = re.sub(r"(?is)<(script|style|noscript)[^>]*>.*?</\1>", " ", html)
return re.sub(r"\s+", " ", re.sub(r"<[^>]+>", " ", html)).strip()
url = sys.argv[1]
reference = text(url, BROWSER)
print(f"{'Browser':<22} {len(reference.split()):>6} words")
for bot in BOTS:
agent = f"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; {bot})"
version = text(url, agent)
ratio = difflib.SequenceMatcher(None, reference, version).ratio()
print(f"{bot:<22} {len(version.split()):>6} words similarity {ratio:.0%}")
if ratio < 0.9:
for line in list(difflib.unified_diff(reference.split(". "), version.split(". "), lineterm="", n=0))[2:12]:
print(" " + line[:160])
Run python3 comparer-robots.py https://example.com/tarifs/ on the home page, offer pages, pricing and the pages most cited by assistants. A similarity close to 100% is expected. A gap of a few percent often comes from variable elements (security token, date, random block); look at the lines displayed. An HTTP 403 code indicates blocking, not deception: that is an access issue, covered in check CDN, Cloudflare and WAF (opens in a new tab).
Good to know: this test runs from your own IP address. A server that tells bots apart by their official IP ranges, rather than by their user agent, does not give itself away like this. For Google, Search Console's URL Inspection tool shows the page crawled by the real Googlebot (“View crawled page”); Bing Webmaster Tools URL Inspection does the same for Bingbot. Compare that HTML with the browser's.
2. Compare the versions for machines. If the site publishes an llms.txt, Markdown versions (/page.md) or responds to Accept: text/markdown, compare their claims with the HTML page:
curl -s -H "Accept: text/markdown" https://example.com/tarifs/ | head -60
curl -s https://example.com/llms.txt
Prices, commitment, guarantees, service areas and figures must be identical to those on the page.
3. Compare the structured data with what is visible. For each key page, every value of description, offers, aggregateRating, award or review must appear on the displayed page. Method: align markup with visible content (opens in a new tab).
4. Look for user agent rules in the configuration. The sections under “How to implement” give the command for each environment.
Compliant situation: the same text for the browser and every bot, Markdown versions and llms.txt faithful to the page, all structured data visible, no rule that changes the content depending on the bot.
How to implement
Before you start
What is allowed and what is not. The criterion is equivalent information, not identical bytes.
| Practice | Status | Condition |
|---|---|---|
| Server-side rendering or prerendering served to bots | Allowed | Same content as what the user sees; Google does not consider dynamic rendering to be cloaking if the content is similar, but presents it as a workaround |
| Markdown conversion of the HTML page (Cloudflare's Markdown for Agents, for example) | Allowed | Generated from the same page, with nothing added |
| Paid content with an excerpt for bots | Allowed | Google's paywalled content markup, which serves to distinguish it from cloaking |
| Blocking or rate-limiting a bot | Allowed | It is not deception; it is your access policy |
| Page or block reserved for assistants' crawlers, with a different message | To remove | None |
Markdown version or llms.txt written separately, more flattering or outdated |
To fix | Align with the page or delete |
| Structured data claiming what the page does not say | To remove | None |
| Orphan pages “for AI”, unlinked, with claims absent from the site | To remove or integrate | Integrate them into the visible site, linked and consistent |
Related cases are covered in the domain's other guides: cloaking aimed at Googlebot in eliminate deceptive cloaking (opens in a new tab), instructions addressed to assistants in eliminate manipulative prompt injection (opens in a new tab), hidden text in eliminate manipulative hidden text and links (opens in a new tab).
Do not replace deception with accidental blocking. When removing a rule, check that the bots you want to welcome still receive a 200 response.
Apache
Versions Apache 2.4.
Look for conditions on the user agent:
grep -r -n -i "HTTP_USER_AGENT" /etc/apache2/ /var/www/example/public/.htaccess
A rule that denies a bot ([F]) is a matter of access policy. A rule that redirects or rewrites it to other content is the one to remove:
# To remove: version reserved for assistants' crawlers
RewriteCond %{HTTP_USER_AGENT} (GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|PerplexityBot) [NC]
RewriteRule ^tarifs/?$ /ai/tarifs.html [L]
Delete both lines, delete the directory of reserved content (/ai/ here) or redirect its URLs to the public pages (Redirect 301 /ai/tarifs.html /tarifs/). A change to .htaccess takes effect immediately; for the server configuration, sudo apachectl configtest && sudo systemctl reload apache2.
Nginx
Versions Nginx 1.20 and later.
grep -r -n -E "\\\$http_user_agent|map .*user_agent" /etc/nginx/
The pattern to look for combines a map on the user agent with a different root, rewrite or proxy_pass:
# To remove
map $http_user_agent $ai_root {
default /var/www/example/public;
~*(gptbot|claudebot|perplexitybot) /var/www/example/ai;
}
server {
root $ai_root;
}
Replace with a single root (root /var/www/example/public;), delete the map, then sudo nginx -t && sudo systemctl reload nginx. If a map on the user agent is used to send bots to a prerendering service, keep it only if the prerendering returns the same page as the browser gets, and check this with the script from the previous section.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026; Markdown for Agents on the Pro, Business and Enterprise plans.
Content reserved for bots can be produced at the edge without appearing on the server:
- Workers: open
Workers & Pagesand, for each Worker routed on the domain, search the code foruser-agent,cf.botManagement,verifiedBotCategoryor a list of bot names tied to HTML rewriting (HTMLRewriter) or to another origin. - Rules: in the Rules overview, check the URL rewrite, redirect and origin rules and the Snippets whose expression uses
http.user_agentorcf.client.bot.
Delete or disable those that change the content depending on the bot. If the goal was to serve a lightweight version to AI agents, the Markdown for Agents feature converts the HTML page itself into Markdown when the client sends Accept: text/markdown: the information stays identical. Purge the cache after the change (Caching > Configuration > Purge Everything).
WordPress
Versions WordPress 6.4 and later.
Search the theme and plugins for code that tests for bots:
grep -r -n -i -E "HTTP_USER_AGENT|gptbot|claudebot|perplexitybot|oai-searchbot|is_bot\(|is_crawler" wp-content/themes/ wp-content/plugins/ wp-content/mu-plugins/ | grep -v -i "wordfence\|vendor/"
Security and cache plugins legitimately test the user agent; what should catch your attention is a test followed by the display of a text, a block or a redirect. Be wary of “AI optimization” plugins: read in their settings what they serve to bots, and turn off any option that adds content for bots that is absent from the page. After fixing, clear the cache plugin's cache: some keep one version per type of visitor.
Laravel
Versions Laravel 11 to 13.
grep -r -n -i -E "userAgent\(\)|header\('User-Agent'\)|gptbot|claudebot|perplexitybot|isBot|isCrawler" app/ routes/ resources/views/
A middleware that returns a different view to bots must be removed:
// To remove: different view for assistants' crawlers
if (Str::contains(strtolower($request->userAgent() ?? ''), ['gptbot', 'claudebot', 'perplexitybot'])) {
return response()->view('ai.pricing', $data);
}
Also remove the middleware from bootstrap/app.php or from the routes concerned, and the resources/views/ai/ views. Metadata and JSON-LD must be produced by the same view as the page.
Next.js
Versions Next.js 15 and 16 (App Router).
Bot sorting usually happens in proxy.ts (named middleware.ts before Next.js 16) or in a server component that reads the user-agent header:
grep -r -n -i -E "userAgent\(|user-agent|isBot|gptbot|claudebot|perplexitybot" proxy.ts middleware.ts app/ src/ 2>/dev/null
Delete any rewrite (NextResponse.rewrite) to a route reserved for bots, and any rendering branch that changes the text based on userAgent(request).isBot. Vercel and other hosts do not add a bot version themselves: the gap comes from the code.
Versions for machines and prerendering services
llms.txtand Markdown versions: generate them from the same sources as the pages, never by hand in parallel. See evaluate Markdown versions (opens in a new tab) and keep the file up to date (opens in a new tab). The format is still experimental.- Prerendering (external service or in-house dynamic rendering): the prerendering cache may serve bots an old version while visitors see the new one. Purge it on every publication, or switch to server-side rendering: see prefer SSR/SSG for critical content if relevant (opens in a new tab).
After the cleanup
- Run the comparison script again on the same URLs and keep the dated result.
- Request recrawling of the affected pages in Search Console and Bing Webmaster Tools.
- If a cloaking manual action appears in the Manual actions report, request a review, describing precisely what was removed.
- Schedule the comparison every month: see schedule automated crawls (opens in a new tab).
Common mistakes
- Considering that a version “for AI” is not cloaking because it does not target Googlebot: the principle and the risk are the same.
- Writing
llms.txtor the Markdown files by hand, then forgetting to update them: the gap with the page becomes unintentional deception. - Keeping structured data “for bots” (rating, price, award) that the page does not display.
- Confusing blocking with deception: denying a bot is an access policy; serving it a different message is manipulation.
- Removing the rule and leaving the reserved directory online: the URLs remain known and readable.
- Testing only by user agent and concluding there is no problem, when IP-based filtering only shows up in the search engines' URL inspection.
Frequently asked questions
Is serving a different version to AI crawlers cloaking?
Yes. Serving AI crawlers a version of a page whose information differs from what visitors get is cloaking: Google defines it as presenting different content to users and to search engines, and its policies also target the manipulation of generative AI answers. A lighter version remains acceptable if it contains the same information, such as a Markdown conversion generated from the same page.
Is a Markdown version of my pages for AI agents allowed?
A Markdown version of your pages is acceptable if it is generated from the same source and contains the same information as the HTML page, with no significant additions or omissions. Cloudflare's Markdown for Agents feature, for example, converts the page itself. A version written separately, more flattering or not kept up to date, becomes misleading content aimed at bots. This format is still experimental.
Is prerendering for bots considered cloaking?
Google does not consider prerendering served to bots to be cloaking as long as it produces content similar to what the user sees. Google does, however, present it as a workaround and recommends server-side or static rendering instead. The risk comes from the prerendering service's cache, which may serve bots an old version: purge it on every publication.
How can I tell whether my site serves different content to GPTBot or ClaudeBot?
Request the same page with a browser's user agent and then with those of GPTBot, ClaudeBot or PerplexityBot, and compare the text you get, for example with curl or a small script. Then look for user agent rules in the server, CDN and code configuration. This test runs from your own IP address: IP-based filtering only shows up in the search engines' inspection tools.
Resources
- Google Search Central: spam policies (cloaking)developers.google.com
- Google Search Central: dynamic rendering as a workarounddevelopers.google.com
- Google Search Central: general structured data guidelinesdevelopers.google.com
- Google Search Central: structured data for paywalled contentdevelopers.google.com
- SPLX: AI-targeted cloakingsplx.ai
- Cloudflare: Markdown for Agentsdevelopers.cloudflare.com
- Next.js: proxy filenextjs.org
Updated on
Topic checklist (PDF)