mm1
mm1

Reputation: 364

multilingual websites for search engines

I have a website in German and English.

If you go to website without the "en" or "de" in the url http://www.example.com/posts/1 I check the browser language and deceide what language the users prefers.

So if an english user visits the site http://www.example.com/posts/1 I show the english content and add to all links on the page the "en" language(no redirect). On the next click on a link the user switches to "en" version.

On each site I have the hreflang entries

<link rel="alternate" hreflang="de" href="http://www.example.com/de/posts/1" />
<link rel="alternate" hreflang="en" href="http://www.example.com/en/posts/1" />

The Problem is that the search engines add the http://www.example.com/posts/1 to their index.

1.) How can I avoid that? Do I have to set a canonical link to one language?

2.) Is it better to redirect the user to language site?

Upvotes: 0

Views: 250

Answers (1)

John Conde
John Conde

Reputation: 219924

Google covers this in two blog posts:

Upvotes: 1

Related Questions