Mobile app version of vmapp.org
Login or Join
BetL925

: SEO - Does Google properly handle hreflang tags with links that just change the language settings in a session cookie? I am currently working on a website that is available in multiple languages.

@BetL925

Posted in: #Cookie #GoogleIndex #Hreflang #Seo #Subdomain

I am currently working on a website that is available in multiple languages. I put some effort in atomatically detecting the users preferred language. This itself is working great. I also offer language buttons to change the language of the site. The URL does not change. I save the language settings with a PHP session. This is working great! But Google just sees the default language (which is English). This is because the buttons for changing the language are inside a form wich sends a POST request.

To summarize it my site does not change the URL when changing the language. My idea to tell Google that it has several different languages is using hreflang tags which will point to the current page but the domain gets a subsdomain with the current language.

Example: (URL: example.com/)
<link rel="alternate" hreflang="en" href="http://en.example.com/">
<link rel="alternate" hreflang="de" href="http://de.example.com/">


When visiting en.example.com/ or de.example.com/ these sites redirect back to example.com/ to make sure the URL stays the same.

Will Google properly index my pages when I do this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @BetL925

1 Comments

Sorted by latest first Latest Oldest Best

 

@Welton855

You need to have separate URLs for Google to be able to index them separately. Using the same URLs for multiple languages won't work. You can dynamically serve the content on a single URL, but the individual language content needs to be on separate URLs too.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme