Sneaky redirects

Redirecting is the act of sending a visitor to a different URL than the one they initially requested. There are many good reasons to redirect one URL to another, for example when moving your site to a new address, or consolidating several pages into one.

However, some redirects are designed to deceive search engines or to display different content to human users than to search engines. It’s a violation of Google’s Webmaster Guidelines to use JavaScript, a meta refresh, or other technologies to redirect a user to a different page with the intent to show the user a different page than a search engine crawler sees. When a redirect is implemented in this way, a search engine may index the original page rather than following the redirect, whereas users are taken to the redirect target. Like cloaking, this practice is deceptive because it attempts to display different content to users and to Googlebot, and can take a visitor somewhere other than where they expected to go.

Using JavaScript to redirect users can be a legitimate practice. When examining JavaScript or other redirects to ensure your site adheres to our guidelines, consider the intent. For example, if you redirect users to an internal page once they’re logged in, you can use JavaScript to do so. Keep in mind that 301 redirects are best when moving your site, but you could use a JavaScript redirect if you don’t have access to your website’s server.