SiteCozy

  • My account

How can I check cloaking on my website?

2018-10-14

Cloaking occurs when the content that you present to Googlebot is different from the content that you present to the user. 

This issue may occur when a script modify your content depending on the user-agent. user-agent is a http field when someone requests a web page from your web server. There is one user-agent per browser and also per bot. For example: the chrome user-agent can be: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

The googlebot user-agent can be Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Htaccess or nginx config file

A command in the Htaccess file or nginx config file may modify the content that is returned to the user depending on the user-agent. Also, someone can get blocked depending on its user-agent. Some people try to block bad bots using user-agent. That’s why it is import to check the config files.

Script inside the website

For some reasons, there are sometimes scripts that returns different content to different visitors. You should review your plugins, your modules, you code customizations to be sure there is not such a script that could generate a cloaking penalty.

Geolocation

There are numerous scripts that try to return a specific content depending on the user location. Unfortunately, many times, it also returns a different content to googleBot and users. I have noticed that geolocation scripts where responsible for cloaking penalty many times. Once again, you should check the geolocation settings, plugins and code.

Hidden content

Google does not like hidden content. From our observation it is very dangerous to use display:none in the CSS styles. It is better to remove content from the code itself.

Google search console

You can check the difference between content returned to user and content returned to Googlebot by going to the “fetch as google” section of GoogleBot search console under “crawl”. Then, click on “fetch and render”. The content of the window named ‘this how Googlebot saw the page” should be equal to the content of the window named “This is how a visitor to your website would have seen the page”

You can also use a very useful chrome extension named “user-agent switcher” which allows visiting websites using a different user-agent. Thus, you can impersonate Googlebot and sees how Googlebot sees your website.

Fetch as google – render mode – google search console

Related Posts:

  • How to understand apache access logs
  • How to protect your forum from spambots in Htaccess without plugins?
  • How to create redirects for a WordPress site without Htaccess/nginx
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018