Hreflang tags and canonical tags - might be causing indexing and duplicate content issues
-
Hi,
Let's say I have a site located at https://www.example.com, and also have subdirectories setup for different languages. For example:
https://www.example.com/es_ES/
https://www.example.com/fr_FR/
https://www.example.com/it_IT/
My Spanish version currently has the following hreflang tags and canonical tag implemented:
My robots.txt file is blocking all of my language subdirectories. For example:
User-agent:*
Disallow: /es_ES/
Disallow: /fr_FR/
Disallow: /it_IT/
This setup doesn't seem right. I don't think I should be blocking the language-specific subdirectories via robots.txt
What are your thoughts?
Does my hreflang tag and canonical tag implementation look correct to you? Should I be doing this differently?
I would greatly appreciate your feedback and/or suggestions.
-
Hi... I'm sorry to tell you that the answer offered by Gaston is not totally correct.
So, in your Spanish page you have these hreflang and canonical annotations:
This is not correct because you are not adding also the self-referential hreflang annotation
Google is very precise about this, and it states its need in the help pages as well in many Googlers tweets and webmaster office hangouts.
The rel="canonical" is correct. Remember that the self-referential and the alternative href URLs must always be canonicals.
Finally, regarding the subfolders blocked via robots.txt, yes! that's totally incorrect:
if you're blocking Googlebot from accessing the Spanish, French and Italian subfolders, then Googlebot won't be able to parse the code of their pages, hence it won't be able to see also the hreflang annotations... with obvious erroneous consequences.
-
that's corect.
-
Yes. example.com/en-US/ redirects 301 to example.com
So, when referencing that version in hreflang will it look like this?
Is this correct?
-
So, every page of example.com/en-US/ redirects 301 to example.com/ ?
If that's the case, then there is no reason in having that folder (/en-US/), just when configuring Hreflang for en-US use the URL without that folder
-
What do you mean by "exactly the same then there should not be 2 sites"?
My https://www.example.com/en-US/ 301 redirects to https://www.example.com
Thoughts?
-
Yeap, those implementations are correct.
in order to avoid duplicate content between different language/countries websites, in each page that is present on each site, there should be their corresponding hreflang tag.
In your case:
And for a sample page: https://www.smarttechMKT.com/es-ES/gastonriera-espanolNOTE, in the case that site.com and site.com/en-us/ are exactly the same then there should not be 2 sites. Just the one without the folder and hreflang tag with en-US should point to that
Hope it helps.
Best luck.
GR -
Thank you for the response, Gaston! I really appreciate it.
So you are certain that my hreflang and canonical tags are implemented correctly? For example, my Spanish version (https://www.example.com/es_ES/
Is this implementation correct?
Also, will I have any duplicate content issues with these different language versions?
-
Hello there,
Watch out your question, there is a site there. If its your clients, edit it.
Canonical and hreflang seems OK.
Blocking other languages/countries is wrong. There you are allowing google to see ONLY the us version.For further reading, take a look at these articles:
Hreflang:
Multi-regional and multilingual sites - Google Search Console
International checklist - Moz Blog
Using the correct hreglang tag - Moz Blog
Guide to international website expansion - Moz Blog
Tool for checking hreflang anotations - Moz Blog Canonicals:
SEO Best Practices for Canonical URLs + the Rel=Canonical Tag - Whiteboard Friday Consolidate duplicate URLs - Google Search Console HelpHope it helps.
Best Luck.
GR.Hope it helps.
Best luck.
GR.
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
-
Traffic drop after hreflang tags added
We operate one company with two websites each serving a different location, one targeting EU customers and the other targeting US customers. thespacecollective.com (EU customers) thespacecollective.com/us/ (US customers) We have always had canonical tags in place, but we added the following hreflang tags two weeks ago (apparently this is best practice); EU site (thespacecollective.com) US site (thespacecollective.com/us/) Literally the same day we added the above hreflang tags our traffic dropped off a cliff (we have lost around 70-80% on the EU site, and after a minor recovery, 50% on the US site). Now, my first instinct is to remove the tags entirely and go back to just using canonical, but if this is truly best practice, that could do more damage than good. This is the only change that has been made in recent weeks regarding SEO. Is there something obvious that I am missing because it looks correct to me?
International SEO | | moon-boots0 -
Can I use rel="alternate" language tags on multiple domains?
On a page with the domain "www.example-1.com.br" (for pt-BR) I will include the following tags: That will work?
International SEO | | Ewerton.RD0 -
Hreflang made simple
I have a client with a Shopify site. It is a clone of the 'main' website which is a .co.uk domain. Client wants to use .com.au for Australia and New Zealand. All are English language. How should we structure hreflang tags? Or is there a better way to target the .com.au website at Australia/New Zealand?
International SEO | | muzzmoz0 -
Providing a default hreflang for translations
I've been doing a lot of research on hreflang and had a question regarding the implementation with location targeting. I have a translation for Brazilian Portuguese, I'd like to target Brazil with this translation on my site but also provide it as the default for other users that speak Portuguese outside of Brazil. Can I use the same translation for two different sites? So my hreflang would look like this: So in this example the pt-br and pt sites would be duplicates but with one being specifically targeted to Brazil and the other for all other people speaking Portuguese anywhere else in the world. The default language of the site is English so the full implementation would look like this:
International SEO | | Brando160 -
Hreflang Alternate & Pagination
Hi everybody, So I'm setting up hreflang tags on an ecommerce site. The sites are in the USA and Canada. The Canadian site will have fewer products than the American site, meaning that there won't be as many pages in each category as there are on the American site. What is the correct way to handle hreflang tags on these extra category pages? To put this another way, the American site may have a category with 3 pages of products, while the Canadian equivalent only has 2 pages of products. What happens to this extra American category page (example.com/widget-category/page-3) ? Does it get an hreflang tag linking to the first page of the equivalent Canadian category (example.ca/widget-category/)? Does it not get any hreflang tags because it has no true Canadian counterpart? Does it matter at all if it has a canonical tag pointing to the first page in the series anyway (example**.com**/widget-category/)? Thanks, Andrew B.
International SEO | | ABullis0 -
Search Console Hreflang-Tag Error "missing return tag": No explanation
Hey there, we have recently implemented hreflang on the sitemap level for our global website. The website has 57 sitemaps that are all referenced in a sitemap index file (www.buschvacuum.com/sitemap.xml). Google is showing several errors in search console ("Sitemap provided URLs and alternate URLs in 'en-AU' that do not have return tags."). However when I try to verify this I do find the return tags. Can this be caused by the fact that my hreflang tags span several sitemap files? To pick one random example (see screenshot for search console error message):
International SEO | | Online-Marketing-Guy
The Originating URL-hreflang-Tag is in www.buschvacuum.com/sitemap_3.xml, the return tag is in www.buschvacuum.com/sitemap_4.xml. It would be great if someone with experience regarding those errors could help me explaining that behavior. Thanks a lot. Jochen WXYQoUH.png0 -
Hreflang tag on every page?
Hello Moz Community, I'm working with a client who has translated their top 50 landing pages into Spanish. It's a large website and we don't have the resources to properly translate all pages at once, so we started with the top 50. We've already translated the content, title tags, URLs, etc. and the content will live in it's own /es-us/ directory. The client's website is set up in a way that all content follows a URL structure such as: https://www.example.com/en-us/. For Page A, it will live in English at: https://www.example.com/en-us/page-a For Page A, it will live in Spanish at https://www.example.com/es-us/page-a ("page-a" may vary since that part of the URL is translated) From my research in the Moz forums and Webmaster Support Console, I've written the following hreflang tags: /> For Page B, it will follow the same structure as Page A, and I wrote the corresponding hreflang tags the same way. My question is, do both of these tags need to be on both the Spanish and English version of the page? Or, would I put the "en-us" hreflang tag on the Spanish page and the "es-us" hreflang tag on the English page? I'm thinking that both hreflang tags should be on both the Spanish and English pages, but would love some clarification/confirmation from someone that has implemented this successfully before.
International SEO | | DigitalThirdCoast0 -
Duplicate content on multistore Magento website
Hello there, We run a Magento based e-commerce site in the UK for example: domain.com We are looking to launch a USA and Australian version of the website: usa.domain.com and au.domain.com Obviously the currency will be different and so will some of the content. Will we be penalised for having duplicate content across these 3 sites? (As some pages will be very similar or the same) Thanks Robert
International SEO | | roberthseo0