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
-
Google Search Console "International Targeting" is reporting errors that are not present on my site
We are currently handling search for a global brand www.example.com/ which has presence in many countries worldwide. To help Google understand that there is an alternate version of the website available in another language, we have used hreflang tags. These hreflang tags are implemented only via the XML sitemap across all geo-locations. Under the “Search Analytics -> International Targeting” section, in Google Search Console, for the Malaysian website (www.example.com/my/), there are a number of “no-return tags (sitemaps)” errors arising. For example, for India as a geo-location, there is one ‘en-IN’ – no return tags (sitemaps) errors listed. The error is listed below: Originating URL - www.example.com/my/xyz/ Alternate URL - www.example.com/in/xyz/ When the XML sitemap for the URL – www.example.com/in/ was checked for the hreflang tags, it was noticed that the implementation of hreflang tags for the URL – www.example.com/in/xyz/ was perfectly fine and it was providing a return tag to the URL – www.example.com/my/xyz/. After the code level verification, it was identified that the implementation of hreflang tags was perfectly fine via the XML sitemap. Even though at the code level it was verified that the implementation is fine, the error still persists in Google Search Console. Kindly suggest a solution to this situation, and also advise the effects of these errors on search engine performance
International SEO | | Starcom_Search0 -
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 -
International Sites and Duplicate Content
Hello, I am working on a project where have some doubts regarding the structure of international sites and multi languages.Website is in the fashion industry. I think is a common problem for this industry. Website is translated in 5 languages and sell in 21 countries. As you can imagine this create a huge number of urls, so much that with ScreamingFrog I cant even complete the crawling. Perhaps the UK site is visible in all those versions http://www.MyDomain.com/en/GB/ http://www.MyDomain.com/it/GB/ http://www.MyDomain.com/fr/GB/ http://www.MyDomain.com/de/GB/ http://www.MyDomain.com/es/GB/ Obviously for SEO only the first version is important One other example, the French site is available in 5 languages and again... http://www.MyDomain.com/fr/FR/ http://www.MyDomain.com/en/FR/ http://www.MyDomain.com/it/FR/ http://www.MyDomain.com/de/FR/ http://www.MyDomain.com/es/FR/ And so on...this is creating 3 issues mainly: Endless crawling - with crawlers not focusing on most important pages Duplication of content Wrong GEO urls ranking in Google I have already implemented href lang but didn't noticed any improvements. Therefore my question is Should I exclude with "robots.txt" and "no index" the non appropriate targeting? Perhaps for UK leave crawable just English version i.e. http://www.MyDomain.com/en/GB/, for France just the French version http://www.MyDomain.com/fr/FR/ and so on What I would like to get doing this is to have the crawlers more focused on the important SEO pages, avoid content duplication and wrong urls rankings on local Google Please comment
International SEO | | guidoampollini0 -
International advice.... can anyone help and check my site?
Hi ALL, I'm running 3 sites, internationally .com, com.au and co.nz Can anyone please look at my site and give me feedback about the hreflang tags, I ran a W3C and i have errors stating https://validator.nu/?doc=http%3A%2F%2Fzenory.co.nz for www.zenory.com and its relevant domains
International SEO | | edward-may0 -
Wordpress SEO/ Ecommerce , Site with Multiple Domains ( International ) & Canonical URLs
Hi I have an ecommerce site with an integrated wordpress instance. I want to have one wordpress site that outputs to 2 domains exactly the same content , but one will have canonical URL . NZ & Australia Sites. So: Would I use the rel="Alternate" hreflang="en-nz" . I want the same content to rank well for each country and not be penalised for duplicate content. Ideas?
International SEO | | s_EOgi_Bear0 -
My site is not showing on google.com ?
My website is not showing at all on google.com searches under search terms. It is showing if i search for my domain (xyz.com) but not by keywords. Searching by keywords and search terms shows my website on yahoo , bing and non US oogle as google.co.uk or google.com.pk on first page. Would appreciate any help in trying to understand why this is happening? The website is medicare.md. if you search for term "medicare doctors PG county maryland" it is #1 in bing and yahoo but not even showing on google.com first TEN pages, although not banned. Interestingly if you do that search on google.co.pk it is #4. Quite Puzzuling !! Would appreciate any help or advice . Sherif Hassan
International SEO | | sherohass0 -
Alexa Rank and Linking from Article sites.
We are creating unique content and submitting our articles to article sites. I have some questions about the best way to go about this. 1. We are being very careful to create unique content for each submission - so we are not submitting the same article to multiple sites. Each submission is unique, so 1 article per 1 article directory. 2. When I did my research about these article sites at Alexa.com, I noticed that a lot of the article sites are ranking very well globally, but that a lot of them are #1 in Alexa for India. They are still ranked for other countries with very top ranking, for example, they may 9,000 Alexa rank in India and then 18,000 in the U.S. which is still very high. 3. We are trying to reach U.S. customers mostly, so I am wondering if we are still getting value by linking to these sites who have global reach (even though they are ranked best for India). I would think that this is very beneficial still, but I didn't want to get the wrong kind of traffic by getting links from sites that are primarily getting their traffic from India, even though they are also getting tons of traffic from the U.S. - I am assuming this is OK because a 18,000 or 19,000 Alexa Rank in the U.S. is still excellent and I will benefit by this. But I wanted to be sure. Feedback?
International SEO | | applesofgold0 -
Google Webmaster Tools - International SEO Geo-Targeting site with Worldwide rankings
I have a client who already has rankings in the US & internationally. The site is broken down like this: url.com (main site with USA & International Rankings) url.com/de url.com/de-english url.com/ng url.com/au url.com/ch url.com/ch-french url.com/etc Each folder has it's own sitmap & relative content for it's respective country. I am reading in google webmaster tools > site config > settings, the option under 'Learn More': "If you don't want your site associated with any location, select Unlisted." If I want to keep my client's international rankings the way it currently is on url.com, do NOT geo target to United States? So I select unlisted, right? Would I use geo targeting on the url.com/de, url.com/de-english, url.com/ng, url.com/au and so on?
International SEO | | Francisco_Meza0