Ad

Reroute Url Based On Location

- 1 answer

Recently I made my site to reroute the url, based on the language set in the visitors browser. So if a Swedish visitor came to the site, he was rerouted to mysite.com/sv, and an english visitor to mysite.com/en.

Soon after I released this, my Google rank just plummeted. So how did I go wrong here? Is there some common practice to auto-redirect of visitors based on their locale that doesn't hurt SEO, or do I need to set some kind of HTTP code for this to be approved by search engines?

Ad

Answer

The penalty you've acquired is for cloaking.

Short answer: Don't do redirects yourself - instead use hreflang codes and canonical links, then let the person's Google settings decide.

A Swedish person searching on google.com wants the English version, even if their browser is Swedish. Google does checks where it uses different user agents from different locations to test if you're serving the same content they see to everyone else. When this differs, your site gets flagged for attempting to hide it's true content - hence 'cloaking'.

More here: https://support.google.com/webmasters/answer/66355?hl=en

Ad
source: stackoverflow.com
Ad