Sector 84, Gurgaon 122004, Haryana · Monday to Saturday, 9 AM to 5 PM +91 9818450754 [email protected]

What Is Cloaking in SEO? Types, Examples and Why It Gets Sites Penalised

What is cloaking in SEO, search bot view versus visitor view
In this article
  1. What is cloaking in SEO?
  2. How does cloaking work?
  3. What are the main types of cloaking in SEO?
  4. Why do people still try cloaking?
  5. What happens if Google or Bing catches cloaking?
  6. What is not cloaking?
  7. How do you check if your website is cloaking?
  8. How do you fix cloaking and recover your rankings?
  9. Example: how hidden cloaking can hit a Gurgaon business
  10. How can you rank without cloaking?
  11. Frequently asked questions about cloaking in SEO
  12. Is cloaking ever allowed?
  13. Is showing different prices by country cloaking?
  14. Is dynamic rendering cloaking?
  15. Can a hacked WordPress site be cloaked without the owner knowing?
  16. How long does it take to recover from a cloaking penalty?
  17. Does cloaking affect AI Overviews and Copilot answers?
  18. What is the difference between cloaking and sneaky redirects?
  19. Keep one honest version of every page

Cloaking in SEO is when a website shows search engines one version of a page and shows real visitors a different version. The aim is to rank for words or topics the visitor never actually sees. Google and Bing both treat it as spam, and it can push a site out of search results completely.

Here is the part most business owners miss. Very few people cloak on purpose today. The bigger risk is cloaking you do not know about, added by a hacked plugin, a nulled theme or a developer who took a shortcut.

In this guide, we explain what cloaking is, how it works, the main types, what is allowed and how you can check your own website in about ten minutes.

Key takeaways

• Cloaking means serving search engines different content from what users see, with the intent to manipulate rankings.
• Google lists cloaking in its spam policies. Pages that break these policies can rank lower or disappear from results.
• In May 2026, Google clarified that its spam policies also apply to AI Overviews and AI Mode.
• Hackers use cloaking to hide spam from site owners, so a site that looks clean in your browser can still be cloaked.
• Paywalls, country based pricing, mobile layouts and tabs are fine when bots and people get the same core content.

What is cloaking in SEO?

Cloaking in SEO is a black hat technique where a website checks whether a visitor is a search engine crawler or a human, then gives each one different content. The crawler gets a page built to rank. The human gets something else. Google defines it as showing different content to users and search engines to manipulate rankings and mislead users.

Google gives two simple examples in its spam policies. One is showing search engines a page about travel destinations while users land on a page selling discount drugs. The other is adding keywords to a page only when the request comes from a search engine and not from a person.

The key word is intent. If the page a crawler reads and the page a person reads say the same thing, small differences in layout or speed do not make it cloaking.

How does cloaking work?

Cloaking works by reading details from every request that reaches the server, such as the browser name or IP address, and using them to guess who is asking. If the request looks like Googlebot or Bingbot, the server sends a special version of the page. Everyone else gets the normal version.

The flow usually looks like this:

  1. A request arrives at the website.
  2. A script reads signals like the user agent, IP address, referrer or language setting.
  3. If the signals match a known search engine crawler, the script serves a keyword heavy or spam version.
  4. If not, the script serves the page a normal visitor expects.

Because the switch happens on the server, the site owner sees a perfectly normal page every time they open it. That is exactly why hacked cloaking can run for months before anyone notices.

How cloaking in SEO works, a server sending different pages to a search crawler and a visitor
One URL, two different versions

What are the main types of cloaking in SEO?

There are five common types of cloaking in SEO: user agent cloaking, IP based cloaking, JavaScript cloaking, HTTP referrer cloaking and Accept Language header cloaking. Each one uses a different signal to decide whether to show the search engine version or the human version of a page.

Type How it works Simple example
User agent cloaking Reads the browser name sent with each request Visitors whose user agent says “Googlebot” get a page stuffed with keywords
IP based cloaking Matches the visitor’s IP address against known crawler IP ranges Requests from search engine IP addresses get a different page from everyone else
JavaScript cloaking Shows people content through JavaScript while the raw HTML says something else The HTML talks about “SEO services Gurgaon” while visitors see an unrelated sales page
HTTP referrer cloaking Changes content based on where the visitor came from People arriving from a search result see one page, people typing the URL see another
Accept Language header cloaking Changes content based on the language setting a crawler sends The crawler gets an English keyword page, real users get a different page

A close cousin is hidden text: white text on a white background, text placed off screen or font size set to zero. Google treats hidden text and links as a separate spam policy, but the idea is the same. One message for the crawler, another for the person.

Why do people still try cloaking?

People try cloaking because it promises quick rankings for competitive keywords without the slow work of writing useful content and earning links. Today, the most common users are spammers and hackers who want to push pharma, gambling or fake shop pages through someone else’s trusted domain.

For a genuine business, the maths never works. Even if a cloaked page ranks for a few weeks, the visitor lands on content that does not match what they searched for, so they leave. You lose the trust of both the search engine and the customer.

What happens if Google or Bing catches cloaking?

If Google detects cloaking, the pages involved can be demoted or removed from search results, either by automated systems or through a manual action reviewed by a person. Google states that sites violating its spam policies may rank lower or not appear in results at all. Bing’s guidelines also tell site owners to avoid cloaking.

When a person at Google applies a manual action, you will see it in the Manual actions report inside Google Search Console. The issue is usually listed as cloaking or sneaky redirects, and it can affect certain pages or the whole site.

This matters for AI search too. In May 2026, Google updated its spam policy documentation to say the policies apply to generative AI responses in Search, including AI Overviews and AI Mode. So a cloaked page is not a back door into AI answers. It is the same violation in a new place.

What is not cloaking?

Showing different versions of a page is not cloaking when a search engine and a human from the same situation get the same core content. Paywalls that let Google see the full content, country based pricing, responsive mobile layouts, tabs, accordions and lazy loaded images are all normal practices, not spam.

Practice Is it cloaking? Why
Paywall where Google can see the full article and you follow Flexible Sampling guidance No Google says this is not cloaking
Showing prices in rupees to Indian visitors and dollars to US visitors No Googlebot from a location gets what a person from that location gets
Responsive design for mobile and desktop No Same content, different layout
Tabs, accordions and “read more” sections No Google says dynamic show and hide elements for user experience are fine
Serving search engines a keyword stuffed version of the page Yes Different content to manipulate rankings
Sending visitors from search to a different page than the one Google indexed Yes, this is sneaky redirects A related spam policy

One grey area is dynamic rendering, where a site sends bots a pre rendered HTML copy of a JavaScript page. It is allowed when the content matches what users see, but Google now describes it as a workaround and recommends server side rendering or static rendering instead.

How do you check if your website is cloaking?

The quickest way to check for cloaking is to compare what Googlebot sees with what you see. Use the URL Inspection tool in Google Search Console, run a live test and view the tested page. If the HTML or screenshot shows content you never wrote, your site may be cloaked.

Follow these steps:

  1. Run URL Inspection. In Google Search Console, enter your homepage and key service pages, click Test live URL, then View tested page. Compare the HTML and screenshot with your live page.
  2. Search your own site. Type site:yourdomain.com into Google. Look for strange titles about casinos, medicines, loans or Japanese characters.
  3. Check two Search Console reports. Open Manual actions and Security issues. Both should say no issues detected.
  4. Pretend to be Googlebot. In Chrome DevTools, open Network conditions and set the user agent to Googlebot, then reload the page. This catches user agent cloaking, but not IP based cloaking, so do not rely on it alone.
  5. Check Bing too. Use URL Inspection in Bing Webmaster Tools to see how Bingbot reads the page.
  6. Look at the code. Search your .htaccess file, theme files and recently added plugins for code that checks for words like “googlebot” or “bingbot” in the user agent.
Website owner checking for cloaking with Google Search Console URL Inspection
Compare what Googlebot sees with what you see

How do you fix cloaking and recover your rankings?

To fix cloaking, remove the code that serves different content, clean up any hack behind it and make sure bots and users see the same page. If you have a manual action, request a review in Search Console after the fix. Recovery takes time, and nobody can promise exact dates.

  1. Find the source. Check plugins, themes, .htaccess rules and server configuration. Remove anything you did not install yourself.
  2. Clean the hack. If the site was compromised, change all passwords, update WordPress, themes and plugins, and remove unknown admin users.
  3. Match the versions. Run URL Inspection again and confirm Googlebot now sees the same content as you.
  4. Request a review. If there is a manual action, explain what went wrong, what you fixed and how you will stop it happening again.
  5. Watch Search Console. Track impressions, queries and indexed pages over the next few weeks.

Example: how hidden cloaking can hit a Gurgaon business

Here is a scenario based on the kind of problem we come across during SEO audits. A dental clinic in Gurgaon installs a free copy of a premium WordPress theme from an unofficial site. The website looks fine. But a few weeks later, appointment enquiries from Google drop, and Search Console starts showing queries for medicines the clinic has never heard of.

The theme had hidden code that checked the user agent. Patients saw the clinic’s normal pages. Googlebot saw pages full of pharma links. Nobody at the clinic could see the problem, because nobody at the clinic is Googlebot.

At Balhara Infotech, the first thing we check in a case like this is URL Inspection on the homepage and top pages, then the site: search. The fix here would be to replace the nulled theme with a licensed one, clean the database, reset every password, confirm both versions match and, if a manual action appeared, file a clear review request.

The lesson is simple. A cheap theme or plugin can cost far more than a licensed one.

How can you rank without cloaking?

You rank without cloaking by making your real content easy for search engines to read and genuinely useful for people. That means crawlable HTML, fast pages, clear answers to real search questions and honest links. It is slower than a trick, but it lasts and it builds trust with Google, Bing and AI answer engines.

Most of the old reasons for cloaking were technical. Sites built in Flash or heavy JavaScript could not be read by crawlers, so developers showed bots a separate text version. Today, server side rendering solves that problem without any trickery.

At Balhara Infotech, we usually find that a site’s “ranking problem” is a technical or content gap, not a need for shortcuts. Fixing page speed, structure and content quality almost always does more than any hack could.

Frequently asked questions about cloaking in SEO

Is cloaking ever allowed?

Showing search engines different content to manipulate rankings is never allowed. Practices that change presentation but keep the same core content, like responsive design, geotargeted prices, tabs and paywalls that follow Google’s Flexible Sampling guidance, are not cloaking.

Is showing different prices by country cloaking?

No. Showing rupee prices to visitors in India and dollar prices to visitors in the US is normal geotargeting. Just make sure Googlebot gets what a real person from the same location would get.

Is dynamic rendering cloaking?

Not if the content is the same for bots and users. Google calls dynamic rendering a workaround and recommends server side rendering or static rendering for new sites instead.

Can a hacked WordPress site be cloaked without the owner knowing?

Yes. Google notes that hackers sometimes use cloaking to make a hack harder for site owners to spot. Your browser shows the normal site while search engines see spam pages. URL Inspection in Search Console is the easiest way to check.

How long does it take to recover from a cloaking penalty?

There is no fixed timeline. After you remove the cloaking and Google approves a review request, rankings can take weeks or longer to return, depending on how long the problem lasted and how much trust the site lost.

Does cloaking affect AI Overviews and Copilot answers?

Yes. Google clarified in May 2026 that its spam policies apply to AI Overviews and AI Mode. Bing’s guidelines also prohibit cloaking. A cloaked page puts your visibility at risk across both classic search and AI answers.

What is the difference between cloaking and sneaky redirects?

Cloaking serves different content at the same URL depending on who is asking. Sneaky redirects send users to a different URL from the one search engines indexed. Both are covered by Google’s spam policies.

Keep one honest version of every page

Cloaking in SEO always comes down to one question: does the search engine see what your customer sees? If the answer is yes, you are safe. If the answer is no, or you are not sure, it is worth checking today, because hacked cloaking can quietly drain your traffic for months.

If you want a second pair of eyes, our team in Sector 84, Gurgaon can check your site for cloaking, hidden text, hacked code and other technical issues. You get a plain language report and no lock in contract. Get a free SEO audit and we will show you exactly what Google sees.

Written by Hariom Balhara

Hariom Balhara is the founder of Balhara Infotech, an SEO and digital marketing agency in Gurgaon. He helps local businesses, startups and brands across India get found on Google and in AI answers, and writes about SEO, local search and website growth in plain, practical language.