TL;DR
- Google's spam policies name two cloaking examples: a travel page shown to search engines and a discount-drug page shown to users, and keywords inserted only for crawlers.
- Dynamic rendering is generally not cloaking if content is similar, but Google calls it a workaround and recommends server-side rendering, static rendering or hydration.
- Paywalls are not cloaking when Google sees the full content, Flexible Sampling is followed, and isAccessibleForFree is false with hasPart and a .class cssSelector.
- The cloaked keywords hack often hides in .htaccess as a RewriteRule pointing to a malicious .php file; URL Inspection shows what Google actually receives.
- After fixing every affected page, file Request Review in the Manual actions report; Google says most reviews take several days or weeks.
Cloaking is the practice of showing search engines one version of a page and real users another, with the intent of manipulating rankings and misleading people. Google lists cloaking in its Google Search spam policies: sites that do it may rank lower or disappear from results entirely, and can receive a manual action from a Google reviewer.
This guide explains how cloaking works, which examples Google treats as spam, what looks similar but is not cloaking (dynamic serving, paywalls, lazy-loading), how to check whether a hacked site has had cloaking injected, and how to fix a manual action in Search Console.
What cloaking in SEO is and how it works
Google's spam policies define cloaking as presenting different content to users and search engines in order to manipulate rankings and mislead users. The definition has two parts: the content differs, and there is intent to deceive. If either part is missing, the situation usually is not cloaking in Google's sense.
Technically, a cloaking site needs a way to tell bots from people. The common methods are:
- User-Agent detection: the server reads the request's User-Agent string. If it contains Googlebot, it returns a keyword-stuffed page; a normal browser gets something else.
- IP detection: the server compares the requester's IP with crawler IP ranges and chooses content accordingly.
- Referrer detection: users who click through from a search results page are sent elsewhere, while people who type the URL directly see a normal page, so the site owner never notices the problem.
- Hiding with JavaScript or CSS: text or links that bots can read are hidden from human eyes.
All four share one trait: bots and people get different experiences, and the part the bot sees is built to earn rankings the real page does not deserve.
Examples of cloaking Google treats as spam
Google's spam policies give two clear examples. The first is showing search engines a page about travel destinations while showing users a page about discount drugs. The second is inserting keywords into a page only when the search engine crawler is the one requesting it, so real users never see those keywords.
A closely related behaviour is the sneaky redirect. Google describes it as redirecting maliciously so that users and search engines see different content, or so that users land on content that does not meet their needs. Google's examples: showing search engines one kind of content while redirecting users to something significantly different, or redirecting mobile users to a spam domain while desktop users see a normal page.
Google also notes that legitimate redirects exist, such as moving a site to a new address, consolidating several pages into one, or sending logged-in users to an internal page. The deciding question is whether the redirect is intended to deceive users or search engines.
For marketing teams, the warning signs are worth knowing: an SEO provider offering "bot-only pages" users never see, a plugin promising to feed keywords to Googlebot automatically, or a third-party script that redirects mobile visitors. All of these fall inside the spam policies, and they are what guides on white-hat, grey-hat and black-hat SEO usually put on the black-hat side.
How cloaking differs from dynamic serving and language or device adaptation
Plenty of sites send different HTML based on device or location with no intent to deceive, and Google has guidance for these cases. The difference from cloaking is whether Googlebot receives content equivalent to what a user in the same situation receives.
Dynamic serving
Dynamic serving uses the same URL for every device and has the server check the User-Agent to send different HTML to mobile and desktop. Google's mobile-first indexing guidance says this setup should send the Vary: User-Agent HTTP header to signal that the response changes by device, and stresses that the mobile version should contain the same content as the desktop version. Content can be reorganised into tabs or accordions, but it must be equivalent. Google indexes the mobile version using its smartphone agent, so a mobile version that drops content can lose traffic. Google recommends Responsive Web Design as the main option because it serves the same HTML on the same URL, which removes the content-mismatch risk from the start.
Dynamic rendering
Dynamic rendering sends a pre-rendered page to bots and the normal JavaScript page to users. Google's documentation says Googlebot generally does not consider dynamic rendering to be cloaking as long as it produces similar content. Using it to serve completely different content to users and crawlers can be considered cloaking. Google also calls dynamic rendering a workaround and not a recommended solution, and points to server-side rendering, static rendering or hydration instead.
Pages that adapt by language or country
Google's documentation on locale-adaptive pages says Googlebot's default IP addresses appear to be based in the USA, and the crawler sends requests without setting Accept-Language. If a site switches language automatically by IP, Googlebot may only ever see the English version. Google recommends separate locale URLs annotated with hreflang, and says to treat Googlebot like any other user from the same country: if you block users from one country, block Googlebot when it appears to come from there too. Serving special content to a bot simply because it is a bot is where the line into cloaking is crossed.
Do paywalls and lazy-loading count as cloaking?
Neither counts as cloaking when done according to Google's guidance, but each has conditions.
Paywalls and subscription content
Google's spam policies say paywalls and content gates are not cloaking if Google can see the full gated content, as anyone with access could, and the site follows Google's Flexible Sampling guidance. Flexible Sampling covers patterns such as metering (a quota of free articles before the wall) and lead-in (the first part of an article shown above the wall).
Because Googlebot sees the full text while ordinary users see only part of it, Google asks publishers to add paywalled content structured data so it can tell legitimate paywalls apart from cloaking. In JSON-LD you set isAccessibleForFree to false, then use hasPart to describe each paywalled section as a WebPageElement with a cssSelector pointing at that section's class. Google's documentation says to use only .class selectors, and to list several class names as an array if there are several paywalled sections.
Lazy-loading and content that needs interaction
Lazy-loading is not cloaking because it does not set out to show different content. Done badly, though, Google may never see the content. Google's documentation states that Google Search does not interact with your page: it does not click, swipe or type. Content should load when it enters the viewport, using the browser's built-in lazy-loading, the IntersectionObserver API, or a library that loads on viewport entry, and primary content should not be lazy-loaded behind a user action. After implementation, use URL Inspection to confirm the content appears in the rendered HTML and that image and video URLs are in src attributes.
So the risk with broken lazy-loading is incomplete indexing, not a spam-policy violation. They are different kinds of risk.
Comparison table: what is and is not cloaking
| Pattern | Cloaking? | Condition in Google's guidance |
|---|---|---|
| Sending keywords or an unrelated page to Googlebot | Yes | Named directly as an example in the spam policies |
| Dynamic serving for mobile and desktop | No | Send Vary: User-Agent and keep content equivalent on both versions |
| Dynamic rendering for JavaScript sites | Generally no | Content must be similar; completely different content can be cloaking |
| Paywall or content gate | No | Google sees the full content, Flexible Sampling is followed, paywalled content markup is added |
| Redirecting only mobile users to a spam domain | Yes (sneaky redirect) | Often caused by a hack or a third-party script |
How to check whether a hacked site has cloaking injected
Many site owners never cloak on purpose; they get hacked and the cloaking is planted for them. Google's spam policies define hacked content as any content placed on a site without permission through security vulnerabilities, and list several types: code injection (malicious JavaScript or iframes), page injection (new spam or phishing pages), content injection (hidden text, hidden links or cloaking added to existing pages), and redirects (code that sends some users to spam pages depending on referrer, user agent or device).
What makes this hard is that an injected page can look like a 404 or a normal page in your browser while Googlebot sees spam. The checks below follow Google's guide to fixing the cloaked keywords hack:
- Open the Security Issues report in Search Console to see whether Google has found hacked pages. This report is separate from the Manual Actions report.
- Run a site: search. Type site:yourdomain into Google and scan for unusual URLs, such as pages in a language the site does not use or pages selling products the site does not sell.
- Use URL Inspection. It can reveal content hidden by cloaking. The indexed version shows the raw HTML and HTTP headers from the last crawl; Test live URL shows a rendered screenshot, raw HTML and headers as of now. Compare that with what your browser shows.
- Check every .htaccess file. Google's guide says the cloaked keywords hack often lives in .htaccess as a RewriteRule that routes requests to a malicious .php file with an innocent-sounding name. These files are often hidden, so turn on hidden-file display first.
- Look for unusual PHP files: files that did not ship with the CMS, odd modification dates, unusual sizes, or encoded code using functions such as base64_decode, eval or gzinflate. Common targets include index.php, wp-load.php, 404.php and view.php.
- Review third-party scripts. Google's Manual Actions help page names third-party scripts as one cause of sneaky mobile redirects.
Once you find it, Google's guide says to back up all files and the database offline first, keep a copy of the infected .htaccess for reference and replace it with a clean version, reinstall the CMS core, plugins and themes, delete the .php file the .htaccess pointed to along with other suspicious files, and then re-check the old spam URLs with URL Inspection. A Not Found result suggests the site is clean.
To prevent reinfection, the guide recommends strong, unique passwords for hosting, FTP and CMS accounts, two-factor authentication or passkeys, and keeping the CMS, plugins, themes and modules updated.
How to fix a manual action
A manual action is applied when a human reviewer at Google determines that pages on a site do not comply with the spam policies. The most common result is that pages rank lower or are left out of results. You can see it in the Manual actions report in Search Console, which shows the count at the top, and Google also sends a notice to the Search Console message center.
For cloaking and sneaky redirect manual actions, Google's help page recommends comparing Google's view through URL Inspection with a user's view, removing content that differs, and checking for every kind of redirect, including conditional ones such as redirects that target only Google traffic. For sneaky mobile redirects, also check the Security Issues report to see whether Google thinks the site has been hacked.
The reconsideration request steps on the help page are:
- Expand the manual action description to see the affected pages.
- Identify the issue type and follow its Learn more link.
- Fix the issue on all affected pages. Partial fixes do not earn a partial return to results.
- Make sure Google can reach those pages, with no login, paywall, robots.txt block or noindex in the way.
- When everything is fixed, select Request Review and describe the problem, your fixes and the outcome.
- Do not resubmit until you receive a final decision.
Google says most reconsideration reviews can take several days or weeks, and link-related requests may take longer. While waiting, avoid trial-and-error edits that keep changing the content, because the reviewer needs to see the problem fixed for good.
The spam policies also say that repeated attempts to get around the policies can lead to restricted or removed eligibility for features such as Top Stories or Discover, and to broader removal of site sections from Search.
What this means for websites in Thailand
A few situations deserve extra care for Thai sites. The first is bilingual sites that switch language automatically by IP. Since Googlebot's default IPs appear to be in the USA, the Thai pages may never be seen. Google's recommended fix is clearly separate Thai and English URLs with hreflang, and no forced IP-based redirect.
The second is WordPress sites running many plugins and themes. Hacks that inject keywords and hidden spam pages, such as pages in foreign languages the site does not use, get in through security vulnerabilities, and Google's guide recommends keeping the CMS, plugins and themes updated to close them. Running site: checks regularly and opening the Security Issues report helps catch the problem before it turns into a manual action.
The third is "fast first page" offers that rely on bot-only pages. If a provider cannot explain whether users and Googlebot see the same content, treat it as a risk to the whole domain, not to one page.
If you want a check for content mismatches, sneaky redirects or signs of a hack, our SEO audit service covers these technical checks. For long-term SEO structure in the Thai market see SEO Thailand and SEO services, and for ongoing plugin updates and security upkeep see website support.
FAQ about cloaking
Is cloaking a black-hat SEO technique?
Yes, cloaking is listed in Google Search's spam policies because it shows users and search engines different content to manipulate rankings and mislead users. Sites that violate the policy may rank lower or not appear in results at all.
Is a separate mobile version of a site against the rules?
No, as long as both versions carry equivalent content. Dynamic serving is a setup Google supports: send Vary: User-Agent and keep the mobile content the same as desktop. Google recommends responsive design as the main option.
How do I run a paywall without it looking like cloaking?
Let Google see the full content as a subscriber would, follow Flexible Sampling, and add paywalled content structured data: set isAccessibleForFree to false and use hasPart with a .class cssSelector pointing at the paywalled section.
How long does a reconsideration request take?
Google says most reconsideration reviews can take several days or weeks, and you should not resubmit until you get a final decision. Fix every affected page before you file.
How can I tell if a hack has injected cloaking into my site?
Start with the Security Issues report in Search Console, run a site: search for strange URLs, and use URL Inspection to compare what Google sees with your browser. Then check .htaccess and unusual PHP files.
The line between cloaking and adapting content comes down to one question: does a user in the same situation as Googlebot see equivalent content? If yes, and nothing is meant to deceive, the site is on the safe side.







