SEO: Hreflang Is Not Working Correctly - How Can I Fix It?
My Website is
I have the content in 2 languages, German and English.
Depending on the users country, "mydomain.net" will automatically redirect to:
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"/>
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.
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.
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:
- 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)
- Use rufsam.com (your homepage) as the href for x-default. Google's documentation says x-default should be used for pages that redirect.
- → October CMS create a multi select Form field
- → How to update data attribute on Ajax complete
- → laravel blade templating error
- → should I choose reactjs+f7 or f7+vue.js?
- → How to dynamically add class to parent div of focused input field?
- → Setting the maxlength of text in an element that is displayed
- → Expanding search bar not expanding before search
- → Get the calling element with vue.js
- → Blade: how to include a section in one page but not in another
- → How to print/log reactjs rendered dom?
- → how to write react component to construct HTML DOM