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
-
Hreflang problem?
Hello, We do have a client with a site in multiple versions (one domain per country). French and Spanish versions work really fine, but the problem comes up with the .com and .co.uk versions. This is my hreflang piece of code: When I go to Google.co.uk and search the exact match domain keyword "how much cost an app", I only find the howmuchcostanapp.com domain (1st or 2nd page) instead of howmuchcostanapp.co.uk. The UK one is not appearing! This is very strange. I have spent a lot of time trying to solve this, but I don't know what else to do. Thanks a lot in advance for your comments and help!
International SEO | | Yeeply.com0 -
Duplicate content across English-speaking ccTLDs
Morning, If a brand offering pretty the same products/services has 4 English-speaking ccTLDs (.com, .co.uk, .com.au and .co.nz), what are the best practices when thinking about SEO and content? In an ideal world, all content should be totally unique, but when the products/services offered across every ccTLD are the same, this may prove tricky. Am I right in thinking that duplicate content across ccTLDs is tolerated by Google as they know you're targeting specific countries? Cheers!
International SEO | | PeaSoupDigital0 -
Hreflang link is always going to the homepage
Hey there fellow Mozzers, I'm currently performing some work for a webshop which is located at two different TLD's.
International SEO | | WesleySmits
example.com and example.nl. In the head of both websites the hreflang tags have been added to tell Search Engines which site is targeted at which country. That's good 🙂 However, the hreflang links are pointing to the homepages of both websites from every page on the websites. Isn't example.nl/blog/ not supposed to link the hreflang tag to example.com/blog/?0 -
Help with hreflang configuration
We currently have different country versions of our site with a hreflang configuration; we have a spanish site targeted for Spain and then different subdirectories for every latin american country we're targeting to. Other than minimal differences, at the moment they are similar until we can handle providing unique content for each country. Our goal, then, would be to show the right one for every Google version, but also to avoid penalties. Our configuration is like this: ... Do you reckon this would be the right approach? Moz is currently telling us that there's duplicate content between the different country subdirectories, and to an extent there is, does that correlate with Google penalizing us for it? Also I've seen examples of self-referential alternates (such as including the in the Mexican version), or to put the canonical referencing the primary http://www.example.com/, will any of this help to our goals? Thanks a lot!
International SEO | | doctorSIM0 -
If I redirect based on IP will Google still crawl my international sites if I implement Hreflang
We are setting up several international sites. Ideally, we wouldn't set up any redirects, but if we have to (for merchandising reasons etc) I'd like to assess what the next best option would be. A secondary option could be that we implement the redirects based on IP. However, Google then wouldn't be able to access the content for all the international sites (we're setting up 6 in total) and would only index the .com site. I'm wondering whether the Hreflang annotations would still allow Google to find the International sites? If not, that's a lot of content we are not fully benefiting from. Another option could be that we treat the Googlebot user agent differently, but this would probably be considered as cloaking by the G-Man. If there are any other options, please let me know.
International SEO | | Ben.JD0 -
Redirect the main site to keyword-rich subfolder / specific page for SEO
Hi,
International SEO | | Awaraman
I have two questions. Question 1: is it worthwhile to redirect the main site to keyword-rich subfolder / specific page for SEO? For example, my company's webpage is www.example.com. Would it make sense to redirect the main site to address www.example.com/service-one-in-certain-city ? I am asking this as I have learned that it is important for SEO to have keywords in the URL, and I was thinking that we could do this and include the most important keywords to the subfolder / specific URL. What are the pros and cons and how important is it to include keywords to folders and page URLs. Should I create folders or pages just the sake of keywords? Question 2: Most companies have their main URL shown as www.example.com when you access their domain. However, some multi-language sites show e.g. www.example.com/en or www.example.com/en/main when you type the domain to your web browser to access the site. I undertstand that this is a common practice to use subdomains or folders to separate the language versions. My question is regarding the subfolder. Is it better to have only the subfolder shown (www.example.com/en) or should you also include the specific page's URL after the subfolder with keywords (www.example.com/en/main or www.example.com/en/service-one-in-certain-city)? I don't really understand why some companies show only the subfolder of a specific language page and some the page's URL after the subfolder. Thanks in advance, Sam0 -
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 -
What’s the best way to convert ccTLD to global TLD?
We started out as a Canadian site targeting Canadian users. Now our site http://iCraft.ca has a lot of international buyers and sellers and .ca TLD doesn’t make sense anymore, as we are not performing well on Google.com We are doing a complete site redesign right now, which will address a lot of coding and content specific issues, but we suspect .ca domain will always hold us back in achieving good positions on Google.com. Since Google doesn’t allow ccTLDs to set geo-targeting, what are our options? a) Migrating to a brand new .com site and setting up 301 redirects for all links from iCraft.ca. Would we lose all rankings in this example and pretty much start building them from scratch? Or would PR be transferred page by page from one domain to another through 301 redirects? b) Setup a separate .com site with mirrored content to target global audience and keep .ca site to target Canada. Not sure if splitting PR for the same pages between 2 sites is a good idea. Also, how would you address duplicate content properly in our situation?
International SEO | | MarinaUX
In this video that I found here on forum http://www.youtube.com/watch?v=Ets7nHOV1Yo Matt Cutts says that it’s ok to have duplicate content on different ccTLDs, but he says - make sure you localize your content on those domains. What if you can’t? Most of the content on our site is meant for anyone, not just Canadian users. So, for the most part, we’d have exactly same content on .com site, as we have on .ca site. We could display prices in different currencies on product pages, but the rest of the content – blogs, forum etc. are not country-specific and can’t be localized easily. Also, it’s not clear from the video if all mirrored sites should sit on the same domain name for each country, like example.com and example.ca or is it ok to have example.com and icraft.ca? c) Is there a better option? Thanks for your help!0