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
-
I am based in the UK. I want to appeal to a UK and US market. One of my keywords is 'generalised' which gets way more traffic in my keyword phrase when spelt with a z and not an s. What do I do?
Hi folks. I am based in the UK. I am about to launch a new blog, and I want to appeal to the UK and US markets. One of my primary keywords is 'generalised', which gets way more traffic (as seen using Moz's keyword tool) in my keyword phrase when spelt with a z and not an s. What do I do? Any guidance would be great. I note this has been discussed before, but seemingly without a conclusion. I would really appreciate any help you can provide.
International SEO | | Nobody16165422281340 -
Is it compulsory to use hreflang attribute for Multilingual site? What if I do not use such tag?
Hello Everybody, My main site - abcd.co.uk and other sites are like this se.abcd.co.uk, fr.abcd.co.uk, es.abcd.co.uk etc Now if I donot use hreflang for Multilingual site then google will consider it as subdomain or duplicate site? But content of the sites are in different language. Thanks!
International SEO | | wright3350 -
International Site Merge
Hello, I've never had to deal with an international site before, let alone a site merge. These are two large sites, we've got a few smaller old sites that are currently redirecting to the main site (UK). We are looking at moving all the sites to the .com domain. We are also currently not using SSL (on the main pages, we are on the checkout). We also have a m.domain.com site. Are there any good guides on what needs to be done? My current strategy would be: Convert site to SSL. Mobile site and desktop site must be on the same domain. Start link building to the .com domain now (weaker link profile currently) What's the best way of handling the domains and languages? We're currently using a .tv site for the UK and .com for the US. I was thinking, and please correct me if i'm wrong, that we move the US site from domain.com to domain.com/us/ and the domain.tv to domain.com/en/ Would I then reference these by the following: What would we then do with the canonicals? Would they just reference their "local" version? Any advice or articles to read would really be appreciated.
International SEO | | ThomasHarvey0 -
Web Site Migration - Time to Google indexing
Soon we will do a website migration .com.br to .com/pt-br. Wi will do this migration when we have with lower traffic. Trying to follow Google Guidelines, applying the 301 redirect, sitemap etc... I would like to know, how long time the Google generally will use to transfering the relevance of .com.br to .com/pt-br/ using redirect 301?
International SEO | | mobic0 -
How to set up international SEO for english speaking countries
Hi, My company have offices around the world. However they also provide different services and products depending on the region. For example our offices in the USA, UK and Australia all provide different services to each other. My question is, how do I set up my WordPress website up to cater for these different countries and services? I think the simple answer would be to build a separate website for each, but this would be too costly and we don't have the resources to maintain all three. Many thanks for your time, Tom
International SEO | | CoGri0 -
English directories for foreign blogs ?
Hello guys, I'm Brazilian and I'm still learning SEO stuff and Im learning a lot around your tool, blogs and texts. All my websites are from Brazil, they are in PT-BR and I see a BIG market over here around SEO since comparing to EUA, we dont have so many customization services and our market is still growing. I have been looking for a great SEO strategy and I'm seeing that blog comments (real and quality ones, even nofollow links) and great directories submissions are still good for positioning at th big G. Unfortunatelly, my country don't have so many great directories where I can get great indexed high PR links, so I would like to ask you guys if anyone knows if I send my blog to international directories I would penalize my blog. Every time I think on this subject, I think that maybe google can see this submission as a spam or a blast, even if it was sent manually. Since I read everywhere that its good to find niches related to make up great blog comments, a foreing web directory submission maybe can hurt my rank. Sorry for my bad english.
International SEO | | DanielSp1 -
Google UK picking up USA Site
I have a site with two subfolders one is .../uk and one is .../us Part of the content on the two sites is the same and part is unique. The US site's language is set to en and the UK site's language is set to en_gb. I have setup geo-targeting in webmaster tools. The problem is that the home page is a GEO-IP redirect and it seems to be picking up information from the US site even on google uk. I'm not concerned too much about getting the uk site crawled as we submit a sitemap for that anyway. But my concern is that if I setup the geo-ip redirect as a 301 will my UK site loose all of it's ranking? Also am I likely to be penalised for duplicate content?
International SEO | | matthewdolman0 -
How to optimise you site in other countries eg Australia
We would like to rank better for specific keywords in Australia. We rank pretty well in our home tld .co.uk but would like to do so in .com.au I would appreciate your thoughts and recommendations.
International SEO | | seanmccauley0