In the realm of SEO (Search Engine Optimization), “cloaking” refers to a deceptive technique where the content presented to the search engine spider is different from that presented to the user’s browser. This is done with the intent to deceive search engines so that they display the page when it would not otherwise be displayed.
Once a search engine spider is identified, the server delivers a set of content that’s specifically optimized for high rankings. However, when a regular user accesses the same URL, they see a different set of content, often tailored to be more visually appealing or user-friendly.
Cloaking is considered a violation of Google’s Webmaster Guidelines and Black Hat SEO, because it provides users with different results than they expect. If detected, a website using cloaking might be penalized or banned from search results.
There are some legitimate use-cases for displaying different content to different types of users (e.g., mobile vs. desktop), but this should be done in ways that don’t mislead search engines and users.