Cloaking SEO: Learn What You're Hiding (And Cut It Out)

on under SEO Auditing, Tactic Tuesday.

"Cloaking" occurs whenever what a user sees and what a search engine crawls are somehow different. Cloaking is not always intentional or malicious, and in fact it is frequently accidental. Search engines do a decent job of separating malicious cloaking from accidental cloaking, but we're of the opinion that it should be avoided as often as possible. This is not only because of the possibility of a penalty or an algorithmic downgrade, but because cloaking always results in information being hidden either from users or from search engines, neither of which is a good situation to be in. Whenever data is hidden from search engines, it reduces the amount of information available to allow you to rank for various long tail keywords.

Here are several types of cloaking, how you can find them on your site, and how you can fix them.

1. Accidental Cloaking By Matching Foreground And Background Colors

It's obvious that nobody intentionally puts text on a page with the intent of matching the color of the background, unless the goal is to make that text invisible. For this reason, Google interprets this as a way of hiding content from users, possibly with the goal of stuffing keywords on the page in order to rank for keywords that aren't intended for users to see.

Of course, it's also possible that this can happen by mistake, but Google isn't particularly fond of sites with errors that prevent readability either.

And, of course, it's also possible to have matching foreground and background colors while still having the text appear legible, such as when the text is hovering in front of an image. And we do know that Google uses Page Layout algorithms to view pages as they actually appear. Nevertheless, it's important to take every step you can to avoid a false positive and prevent this from working against you.

Check For Matching Foreground And Background Colors

Check your homepage, a blog post, a standard page, and any other noteable pages with distinct templates to see if they have matching foreground and background colors by using this free tool:

http://www.checkmycolours.com/

The test is based on the algorithms that are suggested by the World Wide Web Consortium (W3C), which says that all pages should have a contrast of 4.5 to 1, or better.

After running the text, click the "only errors" tab to list only the elements on the page with low contrast.

There will almost certainly be a number of "false positives" reported. Even so, all of these false positives should be addressed in order to avoid negative SEO impacts.

Update Your Stylesheets

For each error, click on the row. A window will pop-up allowing you to use a color picker to select a different color if desired. You can use this to select an alternative foreground color with an appropriate contrast level.

Now open up the CSS file responsible for the matching colors, and update the colors to ensure that the foreground and background do not match.

2. Text In Images

Putting text into an image instead of in the form of text means that the information is hard or impossible for search engines to interpret. While this is much less likely to be considered cloaking, it is a possibility, and it is certainly hurting you in terms of being able to rank for any words contained within the image.

Visually Search Your Site For Any Images That Contain Text

Unfortunately, there are no readily available tools capable of crawling sites and identifying whether or not they contain text. The only way to spot it is with a visual inspection.

Check the header, footer, and sidebar navigation for any images that contain text. These are the most frequent locations for these types of issues.

If you aren't sure whether or not text resides within an image, right-click on it. If it is an image, most browsers will give you options such as "Copy Image" or "View Image In New Tab." If these options are not available, the text is most likely not contained within an image. You can also click and drag your cursor in an attempt to copy the text. If it instead drags the image across the screen, you have your answer.

It is not necessary to remove the image and replace it with text if the text is stylized in some way that is only possible via image. If this is the case, update the image "alt" attribute so that it matches the text contained inside of it. This text is perfectly crawlable by Google and is also used by screen readers for the visually impaired.

Check Your Site For Images That Lack An "Alt" Attribute

While there's no way to scan your site for images that contain text, you can scan your site for images that do not have an "alt" attribute. This will include images both with and without text, but in all cases, the lack of an "alt" attribute means that search engines will not have any data on what is contained in the image. You really should make sure all images have an "alt" attribute, but for our purposes here, you can use this method to discover images that contain text and no "alt" attribute.

  1. Go to Screaming Frog and Download it
  2. After downloading and installing Screaming Frog, enter your homepage into the bar at the top of the window next to the "Start" button, then press "Start."
  3. Click the "Images" tab.
  4. Click the "Filter" drop down menu and select "Missing Alt Text."
  5. Copy the "Address" URL into your browser to check if the image contains text.
  6. If it does, update the image so that the "alt" attribute matches the text in the image. Alternatively, if the image adds no value to the text, simply replace it with appropriately formatted text.

3. Text In JavaScript

Text hidden inside of JavaScript has an effect similar to putting the text in an image. While Google may in some cases be able to interpret what is going on, this is not the kind of thing you should leave to chance.

Check Key Pages For Text Hidden In JavaScript

As with images, there is no readily available tool capable of searching your site for text hidden inside of JavaScript. You will have to check a few pages manually by disabling JavaScript in your browser and then visually checking the pages for missing information. (In rarer cases, you may also find information that was hidden by the JavaScript, which is equally problematic.)

To disable JavaScript in Chrome, go to Settings > Privacy > Content Settings > Disable JavaScript.

Make The Text Legible For Search Engines

If you find any text hidden inside of JavaScript, in most cases you can simply remove it and place it in plain HTML, and if the JavaScript elements are needed, you can cover up the HTML with the JavaScript elements.

If this is for some reason not possible, you can include the text in a <noscript> tag where it is still legible to search engines and it will appear if JavaScript is not enabled. As an aside, be weary of using the noscript tag to put a notification on every page, and instead make sure to use it to accurately represent what is on the page if JavaScript is available.

4. Text Hidden By CSS

While it can still happen by mistake, or in some cases, because a designer is testing a different page layout, using CSS to hide text is one of the most blatant forms of cloaking, so it should go without saying that this should be avoided.

Check A Page For Text Hidden By CSS

To check an individual page for any hidden text in Chrome, right click anywhere on the page and select "View Source." After the source code loads, hit CTRL+F, and run a search for "display:" to look for the code "display: none" or something similar. This code hides any text contained within it. You will need to remove this from the page in order to make the text visible, and you should remove it even if there is no text contained within it. If this reveals something that you don't want visible, it shouldn't be on the page.

Additionally, CTRL+F for ".css" to find your referenced css files, and view them. Do the same search here to find any "display: none" cases.

Check Your Entire Site For Text Hidden By CSS

Checking your entire site for hidden text will require the paid version of Screaming Frog.

  1. Open Screaming Frog.
  2. Go to the Configuration menu.
  3. Click "Custom."
  4. Set it to "Filter 1" "Contains" "display: none;"
  5. Press "OK."
  6. Enter your homepage into the bar at the top of the window next to "Start."
  7. Push "Start."
  8. Allow it to finish crawling (allow the bar to reach 100%).
  9. Click the "Custom" tab.
  10. Make sure that the "Filter" drop-down is set to "Filter 1."
  11. Any pages containing "display: none;" will now be visible.
  12. Update the pages to remove "display: none;"

5. Text Hidden From Googlebot

If using CSS to hide text is blatant, hiding text from Googlebot specifically is brazen, shameless, and conspicuously flagrant. Unlike the others on the list, it's unlikely to happen by accident. Even so, that doesn't mean that it was done with your knowledge.

You can use this Chrome plugin to view a site as Googlebot. Check a few key pages to make sure that nothing is being hidden if you set your user agent to Googlebot.

6. Tabs

Finally, tabbed content can sometimes hide information from search engines, even though this is almost always unintentional.

There really isn't any tool to check for this wholesale. Check your main navigation and all of your key pages for tabbed content.

The mere existence of a tab is not detrimental. They can be a very useful navigational device. But if they are being used, each tab should take you to a unique URL. If the URLs are not unique for each tab, this creates problems for your site architecture, since there is no way for a user to link to that specific tab. Ultimately this leads to keyword dilution and hurts your ability to rank for the terms associated with each tab, so it should only be used if all of the tabs are closely related to a central topic, all of the content is indexable by search engines, and it would make sense to place all of the content on one page even without tabs.

To check whether or not the content within a tab has been indexed, copy some text from inside the tab and do a "site:example.com" search for the text. If Google doesn't return anything, odds are the information in that tab is not crawlable for one reason or another.

Conclusion

As you can see, cloaked content isn't always intentional, and it is closely related to other issues that can hide content from search engines which, while they won't necessarily earn you a cloaked content penalty, can certainly hurt your ability to rank. In addition to searching for and resolving issues related to cloaked content, it's important to have a system in place to prevent these issues from relapsing.

  •  
  •  
  •  
  •  
  •  
  • Pankaj Saini

    Thanks for the comparison. Another one I'm considering alongside marketo is GetResponse. Do you know this marketing automation software?