Cloaking is an SEO technique that involves presenting different content or URLs to users and search engine crawlers. Cloaking aims to deceive search engines by showing them one version of a webpage while displaying another version to human visitors. An example of this is when a website might show a page filled with keyword-rich text to search engines, which is designed to improve its ranking in search results, but present entirely different content potentially irrelevant or misleading to actual users. This is often done by using IP delivery (where different content is served based on the user’s IP address) or user-agent detection (which serves different content depending on whether the visitor is a human user or a bot). Although cloaking is mostly using to decieve search engine there are some legitimate usecases i.e. serving mobile-friendly versions of pages based on the user-agent.
User cloaking to decieve violates the guidelines set by most major search engines because it undermines the principle of providing relevant and accurate information based on user queries. Search engines strive to deliver trustworthy results, so using a cloaking technique can lead to penalties for websites, including de-indexing from search results altogether.