SEO same content in 2 countries, how to implement hreflang?
Posted: Tue 31. Mar 2015, 11:36
Hi,
I have almost the same text on two websites: mydomain.de and mydomain.ch. Both sites are in German language, one for Germany, one for Switzerland. The SEO advisor says that I need for example the following in the header to prevent Google for punishing me for double content:
<link rel="alternate" href="http://mydomain.ch/ch-subject.html" hreflang="de-CH" />
<link rel="alternate" href="http://mydomain.de/de-subject.html" hreflang="de-DE" />
Now, the "ch-subject.html"-part of the URL is generated per url-rewrite in the .htaccess file.
And the url-rewrite script of cause uses the alias of the article - let's say "ch-subject".
What do I put in my header (usually in the template) to generate these tags for each articles? Or how do I do that?
Thanks a lot
I have almost the same text on two websites: mydomain.de and mydomain.ch. Both sites are in German language, one for Germany, one for Switzerland. The SEO advisor says that I need for example the following in the header to prevent Google for punishing me for double content:
<link rel="alternate" href="http://mydomain.ch/ch-subject.html" hreflang="de-CH" />
<link rel="alternate" href="http://mydomain.de/de-subject.html" hreflang="de-DE" />
Now, the "ch-subject.html"-part of the URL is generated per url-rewrite in the .htaccess file.
And the url-rewrite script of cause uses the alias of the article - let's say "ch-subject".
What do I put in my header (usually in the template) to generate these tags for each articles? Or how do I do that?
Thanks a lot