What is the proper way to setup hreflang tags on my English and Spanish site?
-
I have a full English website at http://www.example.com and I have a Spanish version of the website at http://spanish.example.com but only about half of the English pages were translated and exist on the Spanish site.
Should I just add a sitemap to both sites with hreflang tags that point to the correct version of the page?
Is this a proper way to set this up? I was going to repeat this same process for all of the applicable URLs that exist on both versions of the website (English and Spanish).
Is it okay to have hreflang="es" or do I need to have a country code attached as well? There are many Spanish speaking countries and I don't know if I need to list them all out. For example hreflang="es-bo" (Bolivia), hreflang="es-cl" (Chile), hreflang="es-co" (Columbia), etc...
Sitemap example for English website URL:
<url><loc>http://www.example.com/</loc></url>Sitemap example for Spanish website URL:
<url><loc>http://spanish.example.com/</loc></url>Thanks in advance for your feedback and help!
-
Sorry for viewing this just now... but - forgive me if I am wrong due to a bad understanding of the question - but I think Tom answer is not correct.
You are telling that your main site is in English, but that has also a Spanish subdomain with just half of it localized in Spanish.
If this is the correct interpretation of the origin of your doubts, than, in the Spanish subdomain the hreflang should be implemented so:
IN CASE OF SPANISH SUBDOMAIN URL WITH SPANISH CONTENT
<loc>http://www.example.com/</loc>
IN CASE OF SPANISH SUBDOMAIN URL WITH ENGLISH CONTENT
<loc>http://www.example.com/</loc>
Why? Because those "en" and "es" mean "English Language" and "Spanish Language", so you cannot declare as Spanish something that Spanish is not. As well you cannot declare both URLs as to shown to English speaking users, because that would create an hiccup to Google, who would not know what of the two it has to finally show to English speaking users.
More over, if you don't want to extend the use of the hreflang suggesting also the countries where to show some given URL, then you should canonicalize the spanish.domain.com URL with English content to the original www.domain.com URL.
The idea of using also the country code ISO could solve - somehow - this issue, because writing something like this:
<loc>http://www.example.com/</loc>
Then you will be telling Google to show the spanish.domain.com URL to the people using english in Spain (Google.es), and the English one to all the people speaking English in the rest of world.
Be aware, though, that Spanish people using Spanish will see in the www.domain.com URL in their Google.es SERPs, because the x-default is telling Google that all the people not using the language indicated in the hreflang="x-X" annotation (which is English), will have to see the main domain URL, and not the spanish subdomain one.
Hreflang is quite a sudoku, but it is extremely logic.
-
Thanks Tom for your input and feedback.
-
Hi,
To answer your first question, using hreflang tags in your sitemaps is a perfectly fine implementation of the tags, they will work whether they’re coded into the of each page, set in the sitemap or set in HTTP headers. This page will be useful for you as it explains all three methods quite well: http://www.branded3.com/blogs/implementing-hreflang-tag/
But when you add them to your sitemap you should include all variations of the page, along with a default – so if a French or German searcher accesses your site, you can define whether they’ll be served the Spanish or English page, like this:
<loc>http://www.example.com/</loc>
To answer your second question about countries, you are fine to use hreflang=”es” to define all Spanish traffic, but using country codes can be useful in some circumstances. For instance if you have a site talking about football, you could use hreflang=”en-us” for a page which refers to the game as ‘soccer’ and use hreflang=”en-gb” for the page calling it ‘football’.
This Google Webmaster support post explains using both quite well under ‘Supported language values’ which I recommend you take a look at as well: https://support.google.com/webmasters/answer/189077?hl=en
Hope that helps,
Tom
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Is it advisable to show additionally also English ciity names of American cities in website versions of non-western languages such as Chinese, Japanese etc?
To my understanding in many Asian languages city names are transcribed as they sound and this can cause confusion especially in the case of lesser known American city names. So I was planning to put in our international website versions (Chinese, Japanese, Korean etc. ) the English name in brackets after the translated city name in meta title and H1.
International SEO | | lcourse
However when I checked Tripadvisor and Booking.com I noticed that they do not show the English city name anywhere on their Asian language versions. Any thoughts?
Would you recommend to put the English city name in brackets after the translated city name or may it rather hurt our ranking and traffic?0 -
What strategy is better for a multilingual site for the SEO point of view?
Hi everyone, in a case for a site with two languages like spanish and english, how would do you deal with it? I can see 4 cases, which is better?? 1. With differents domains: mydomain.es (for spanish version) and mydomain.com (for english version). 2. With subfolder mydomain.com/es/ and mydomain.com/en/ 3. With Subdomain: es.mydomain.com and en.mydomain.com 4 With URL translation (any url is translated in ther languages but not use of subdomain or subfolder): mydominain.com/hola and mydomiain.com/hello Thanks very much for your answers (i love this forum). 🙂
International SEO | | webtematica0 -
International SEO Question: Using hreflang tags across two different TLDs.
Hi! My UK based company just recently made the decision to let the US market operate their ecommerce business independently. Initially, both markets were operating off the same domain using sub-directories (i.e: www.brandname.com/en-us/ , www.brandname.com/en-gb/ ) Now that the US team have broken away from the domain - they are now using www.brandnameUSA.com while the UK continues to use www.brandname.com/en-gb/. The content is similar across both domains - however, the new US website has been able to consolidate several product variations onto single product pages where the UK website is using individual product pages for each variation. We have placed a geo-filter on the main domain which is 301 redirecting North American traffic looking for www.brandname.com to www.brandnameUSA.com However, since the domain change has taken place, product pages from the original domain are now indexing alongside the new US websites product pages in US search results. The UK website wants to be the default destination for all international traffic. My question is - how do we correctly setup hrlang tags across two separate TLDs and how do we handle a situation where multiple product pages on the "default" domain have been consolidated into one product page on the new USA domain? This is how we are currently handling it: "en-us" href="https://www.BRANDNAMEUSA.com/All-Variations" /> href="https://www.BRANDNAMEUSA.com/All-Variations" />
International SEO | | alexcbrands0 -
HELP: Incorrect Meta Tag description showing for the wrong search results
Hi Guys I'm stuck here! I have update the hreftags, updated the sitemaps. I have 3 top level domains and my zenory.com site is showing for the home page the wrong meta tag description, as you can see in the attachement the meta tag is showing the new zealand site meta tag description which is for zenory.co.nz Anyone know what might be going on here? I have also fetched the home page through WMT as well and its still returning the same results any advice would be much appreciated! Thanks
International SEO | | edward-may0 -
Alternate tag. Anybody had success getting English websites only with localized currency served with alternate tag?
I have an English website with USD prices and US phone.
International SEO | | lcourse
Via currency dropdown visitors in Ireland can choose EUR as currency, visitors from Denmark Danish crown etc and via GEO IP I also serve local contact phone numbers. So I though it made sense to define this with the alternate tags, but now after several months google still does not pickup these pages in local searches. Did anybody have success with getting a website just with currency parameter ranked locally using the alternate tag? Does it help to have also static links (not only dropdown links) to currency versions on the page? Any other thing that could help to have google pick these up? Below my code sample:0 -
Ranking well internationally, usage of hreflang, duplicate country content
I'm trying to wrap my head around various options when it comes to international SEO, specifically how to rank well in countries that share a language, and the risk of duplicate content in these cases. We have a chance to start from scratch because we're switching to a new e-commerce platform, and we were looking into using hreflang. Let's assume an example of a .com webshop that targets both Austria and Germany. One option is to include both language and region in the URL, and mark these as such using hreflang: webshop.com/de-de/german-language-content (with hreflang de-de)
International SEO | | DocdataCommerce
webshop.com/de-at/german-language-content (with hreflang de-at) Another option would be to only include the language in the URL, not the region, and let Google figure out the rest: webshop.com/de/german-language-content (with hreflang de) Which would be better? The risk of inserting a country, of course, is that you're introducing duplicate content, especially since for webshops there are usually only minor differences in content (pricing, currency, a word here and there). If hreflang is an effective means to make sure that visitors from each country get the correct URL from the search engines, I don't see any reason not to use this way. But if search engines get it wrong, users will end up in the wrong page and will have to switch country, which could result in conversion loss. Also, if you only use language in the URL, is it useful at all to use hreflang? Aren't engines perfectly able to recognize language already? I don't mention ccTLDs here because most of the time we're required to use a .com domain owned by our customer. But if we did, would that be much better? And would it still be useful to use hreflang then? webshop.de/german-language-content (with hreflang de-de)
webshop.at/german-language-content (with hreflang de-at) Michel Hendriks
Docdata Commerce0 -
How can I see what my web site looks like from a different country?
I've tried a few proxy tools to try to see how my site looks from other global locations, but haven't found one that works very well yet -- or a list of reliable proxies around the world. I need to do this to test various geo-targetted ads and other optimizations. Can anyone make a recommendation? Thanks!
International SEO | | Dennis-529610 -
I need suggestions. We're helping a big journal to improve their external links, even though they've a site with over 10 million monthly visits, their external links are week. Any suggestions?
Please let us know where we can find information on how to improve external links for a very big journal site. Thanks.
International SEO | | carloscontinua0