Ad

SEO: Hreflang Is Not Working Correctly - How Can I Fix It?

- 1 answer

My Website is

www.mydomain.net

I have the content in 2 languages, German and English.

Depending on the users country, "mydomain.net" will automatically redirect to:

www.mydomain.net/de

or

www.mydomain.net/en

I'm using these href-lang tags:

<link rel="alternate" hreflang="x-default" target="_blank" rel="nofollow noreferrer" href="mydomain.net/en"/>
<link rel="alternate" hreflang="de" target="_blank" rel="nofollow noreferrer" href="mydomain.net/de"/>
<link rel="alternate" hreflang="en" target="_blank" rel="nofollow noreferrer" href="mydomain.net/en"/>

Expected result

If a German user googles "mydomain.net", it should display the German content (Meta-Description etc.) of the website.

If an English user googles "mydomain.net", it should display the English content (Meta-Description etc.) of the website.

However this isn't working correctly at the moment.

Actual result

When a German user Googles "mydomain.net", he gets the English result. The English meta description will get displayed. Shouldn't google display the German result?

However if a German user Googles for example something like this "mydomain.net Kontakt" (includes a German word) it will display the German result as expected.

Ad

Answer

Auto-redirection is generally a bad idea. If a bot is auto-redirected then it may not be able to discover all your content. You're also using cookies to store the user's content preference.

What I'd recommend is:

  1. rufsam.com (your homepage) can auto-redirect to /en or /de but /en and /de pages should never redirect (you are currently redirecting them based on cookie)
  2. Use rufsam.com (your homepage) as the href for x-default. Google's documentation says x-default should be used for pages that redirect.
Ad
source: stackoverflow.com
Ad