Welcome to WebmasterWorld Guest from 54.166.172.180

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

hreflang - using on subdomains?

     
8:39 pm on Jul 30, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


Hi,

We just finished up translating our site into Korean. I want to make sure we set up the Href Lang correctly. I have changed the targeting in Webmaster Tools. I will be working with a guy in Korea to help me with Naver, but wanted confirmation that everything is correct.

So do we add these two lines of code to every page on both the US and Korea site?

<link rel="alternate" href="kr.domain.com" hreflang="ko-us" />
<link rel="alternate" href="www.domain.com" hreflang="en" />

Is there anything else that should be done?

Thank you!
1:28 am on July 31, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


hreflang="ko-us"

Don't use hyphenated languages unless your site actually has more than one of the same language, like en-us vs. en-ca vs. en-au.

The link has to point to the full URL, so I hope you just simplified that bit for posting. If different hostnames are involved, you have to start with the protocol, as you would with any link. Beware of relative links.

You are right about the overall format: in 'link rel="alternate"' constructions, always list all forms of a page, including the one you're currently on. (This is different from ordinary links, where you normally don't link to yourself.)
12:50 pm on July 31, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


Sorry, that first one was wrong, should be:

<link rel="alternate" href="kr.domain.com" hreflang="ko-kr" />

So do I put this on every page on the regular domain or the subdomain? I am trying to figure out which domain to put the codes on? The Korea domain only serves Korea, while the main domain serves the world.

Thanks again!
6:45 pm on July 31, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


Heh. Somehow I didn't think there was a full-blown US dialect of Korean ;)

Each page needs its own links, giving the alternates for that specific page. So if you're on /hotels/budget then the links might be
<link rel="alternate" href="http://kr.example.com/hotels/budget" hreflang="ko" />
<link rel="alternate" href="http://www.example.com/hotels/budget" hreflang="en" />
(Are you really in XHTML? Why?) And then for /info/sights it would be
<link rel="alternate" href="http://kr.example.com/info/sights" hreflang="ko" />
<link rel="alternate" href="http://www.example.com/info/sights" hreflang="en" />
and so on. Always the same pair of alternates for each pair of pages.

If, instead of subdomains, you used subdirectories within the same site, the format would instead be
<link rel="alternate" href="/kr/hotels/budget" hreflang="ko" />
<link rel="alternate" href="/hotels/budget" hreflang="en" />
and
<link rel="alternate" href="/kr/info/sights" hreflang="ko" />
<link rel="alternate" href="/info/sights" hreflang="en" />
and so on. Links are always given in the same format as an ordinary <a href> link.


I looked it up. Korean is ko; kr is, uh, Kanuri. (I consider it a personal humiliation when I come across a language name I've never heard of. It's in the Nilo-Saharan family.)
7:52 pm on July 31, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


Don't you put in the language and the country you are targeting though?
9:31 pm on July 31, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


Yes, that's the "hreflang" bit. Did the Forums display eat the end of each line? On mine it spills over.
6:46 pm on Aug 4, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


So the two href lang codes mentioned above, do I put each set on every page of each (the kr subdomain and the regular domain)?

<link rel="alternate" href="kr.domain.com" hreflang="ko-kr" />
<link rel="alternate" href="www.domain.com" hreflang="en" />

Sine the main site targets multiple countries, should I only use English or not target anything at all?
6:55 pm on Aug 4, 2015 (gmt 0)

Moderator from US 

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 10, 2005
posts:5757
votes: 122


Somehow I didn't think there was a full-blown US dialect of Korean ;)

I guess you haven't spent as much time around Korean-Americans as I have. :)
1:20 pm on Aug 11, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


Still confused:

Do I put each set on every page of each (the kr subdomain and the regular domain)?

<link rel="alternate" href="kr.domain.com" hreflang="ko-kr" />
<link rel="alternate" href="www.domain.com" hreflang="en" />

The main site targets multiple countries (so I don't want to set a specific country), should I only use English or not target anything at all?

I want to make sure the subdomain isn't causing any duplicate content issues in the US and only targets Korea.
3:13 pm on Aug 11, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member ciml is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2001
posts: 3805
votes: 2


I don't see any harm with "en", but I think you're looking for "x-default".

<link rel="alternate" href="http://kr.example.com/foo.html" hreflang="ko-kr" />
<link rel="alternate" href="http://www.example.com/foo.html" hreflang="x-default" />

The current description of hreflang is [support.google.com...] but "x-default" was explained nicely in [googlewebmastercentral.blogspot.co.uk...]
3:17 pm on Aug 11, 2015 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 11, 2006
posts: 196
votes: 0


Ahhh...thank you! So would I add:

<link rel="alternate" href="http://kr.example.com/foo.html" hreflang="ko-kr" />
<link rel="alternate" href="http://www.example.com/foo.html" hreflang="x-default" />

To every page on each site (us site and kr subdomain)?
5:15 pm on Aug 11, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


The form <link rel="alternate"> -- whether it involves hreflang, like here, or some other variable like device type -- is specific to an individual page. It means "The current page exists in multiple versions, which are the same except for such-and-such detail (such as language)".

Several times you've posted the form
<link rel="alternate" href="kr.domain.com" hreflang="ko-kr" />
<link rel="alternate" href="www.domain.com" hreflang="en" />
This makes me uneasy, because I can't tell if you're editing or if you're missing the principle. It has to be a complete link, just like an <a href> link. And get rid of that "ko-kr", which implies "this version is only for people who speak the ROC dialect of Korean". It's just "ko".

Admittedly it's a bit of an academic distinction in the specific case of Korean, because I don't suppose you get a lot of traffic from those 1024 PRK government officials, "ko-kp".
5:17 pm on Aug 11, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member ciml is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2001
posts: 3805
votes: 2


Yes on every page, though in this model the www site is worldwide (apart from Korean language speakers in the Republic of Korea), rather than people in the USA.

It would be nice if we had on option like "*-us" to select a country (regardless of language), but we don't (yet).
6:36 pm on Aug 11, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member ciml is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2001
posts: 3805
votes: 2


lucy24, a two letter code in the subtag of the hreflang value denotes country/region (by ISO 3166-1 Alpha 2) rather than dialect (see [ietf.org...]

Longer subcodes are used for dialect or script variation. Google does support combinations with scripts, so zh-Hans-HK would match a Simplified Chinese user in Hong Kong, while zh-Hant-HK would match a Traditional Chinese user in Hong Kong.

I do not think that Google use dialects, such as ko-Jeolla or en-Cockney-ES..

In vetofunk's case, en-KR would match an English speaker in Republic of Korea, while ko-US would match a Korean speaker in the USA.
7:07 pm on Aug 11, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


denotes country/region

I'm talking about real-life users' experiences. A pair like en-us vs en-gb is a linguistic choice; questions about pounds vs. dollars will be addressed via some additional geolocation and (one hopes) an option for user overrides. If you live in France, you'd want your page text to be in Continental French* even if you're asking how much something will cost you in Quebec.

Otherwise you could attach any country code to any language code and evaluate them independently, and that's clearly not how the ab-cd pairings work.


* If you live in France, you are probably not prepared to admit that such a thing as Canadian French even exists. Har, har.
8:41 pm on Aug 11, 2015 (gmt 0)

Senior Member

WebmasterWorld Senior Member ciml is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 22, 2001
posts: 3805
votes: 2


attach any country code to any language code


Yes, Google's implementation follows the intent of the HTML specifications and the RFC. hreflang en-US and en-GB should be English speakers physically present in the USA and UK respectively, whatever their dialect. No linguistic choice is implied by two letter subcodes. If I wrote de-MX I would be targeting German speakers physically in Mexico. (These are similar to the language+location combinations that you can select in AdWords.)

I accept that some webmasters might want to target en-American or en-British (for example if I were physically present on the Moon I might want British English content, not American), but I am not aware that Google support this currently. I've tried to find the right codes for such dialects, but so far they have eluded me (AdWords doesn't seem to support them either). I suspect the main reason for this is that browser headers don't tend to imply accurate dialects, so it would be hard for a search engine to know which dialect to use.

The only practical example of dialect/script that I have come across in hreflang (as in AdWords) in Chinese, where zh-HK and zh-CN imply Chinese speakers in Hong Kong and mainland China respectively, while zh-Hant is Chinese (Traditional) and zh-Hans is Chinese (Simplified). Perhaps some other languages like Azerbaijani too, but I haven't come across any commercial implementation in hreflang. No Cockney or Shanghainese for the moment!
8:07 am on Aug 12, 2015 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:14722
votes: 616


I am not aware that Google support this currently

But, but, but, hreflang isn't a Google proprietary attribute. It just happens to be an attribute they're willing to recognize (unlike, to take the obvious example, "lang"). It's meant for browsers.

Reverting to the OP: If you have English-speaking visitors who happen to be physically located in Korea-- or Korean-speaking visitors who happen to be located anywhere other than the ROK-- would you want them to be served ko or en?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members