What is cloaking? How do you detect cloaking practices on a website?

Cloaking describes a situation where a website shows different content to search engine robots than it does to users. For example, you might show keyword-stuffed text solely to search engine crawlers while hiding that text from users.

In other cases, there can be cloaked redirects. With a cloaked redirect, the redirected URL may take Googlebot to one page and users to a different page.

This is a deceptive technique designed to manipulate search rankings. As a result, cloaking violates Google’ guidelines and can be a cause of manual actions.

However, here is the thing to keep in mind: cloaking doesn’t always happen intentionally. It is very possible to accidentally have cloaking happen your website. Some examples I’ve seen…

  • Pages get cached for Googlebot to improve site speed. The cache doesn’t refresh and the content shown to Googlebot falls out of sync with the content shown to users.
  • A/B testing tools aren’t configured correctly and don’t serve the same base content to search engines and users.
  • Geolocation and personalization may redirect users to a page that serves a very different purpose than the non-localized/non-personalized page shown to users.

When auditing a website, you want to load your website as Googlebot and compare the output. Is the page content different for Googlebot and users? A few differences won’t cause problems (i.e. ads aren’t shown to Google) but bigger differences could be considered cloaking (i.e. whole sections of the page are removed from Google).

The easiest way to test this is by changing your user agent in Chrome Dev Tools when loading the page. In DevTools, look in the lower panel for “Network Conditions”. You may need to use the three vertical dots menu (kebab menu) in the upper panel, go to “More Tools” and click “Network Conditions”.

Once you’ve located Network Conditions, you’ll see an option to change the user agent. By default, this is set to “User browser default”. Uncheck that box and then use the dropdown to choose a new user agent. Googlebot Desktop and Smartphone are both available in the dropdown.