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
Still - maybe I have a little block in my brain - but how do I get the specific link tags with the specific url in each and every article's head?
- Oliver Georgi
- Site Admin
- Posts: 9791
- Joined: Fri 3. Oct 2003, 22:22
- Location: Moscow, Russia
The <link> can be generated using frontend render. If it's done well it's also not that hard to switch the domain too based on detected language and keep everything on the same hosting account inside the same CMS installation.
There is more https://support.google.com/webmasters/topic/2370587