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
SEO same content in 2 countries, how to implement hreflang?
SEO same content in 2 countries, how to implement hreflang?
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign
Re: SEO same content in 2 countries, how to implement hrefla
Isn't it possible, to use 2 separate main templates for the different "languages"???
Re: SEO same content in 2 countries, how to implement hrefla
It is. These are even 2 separate phpwcms installations running under different IPs.
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?
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?
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign
- Oliver Georgi
- Site Admin
- Posts: 9892
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: SEO same content in 2 countries, how to implement hrefla
no need to have different templates, first I would configure the lang config for your needs. Then you have the correct lang attribute in the <html> tag.
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
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