Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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
-
Why Doesn't Google Use My Title Tag and Meta Description?
Hi fellow Moz SEOs, Need your URGENT help! We set an optimised title & meta description for our client websites. These titles are approved by our clients. Before somedays, they checked on Google, noticed the title & meta description were not the same. Next moment, they notified me about this issue. The title & meta description looks fine when I checked the source code. So, why Google use title & meta description differently? For example: Title approved by client: Top Specialist Divorce & Family Lawyer - Yeo & Associates LLC
International SEO | | Verz
Google set our title: Yeo & Associates LLC: Top Specialist Divorce & Family Lawyer Title approved by client: Filing For Divorce Online in Singapore | DivorceBureau®
Google set our title: DivorceBureau®: Filing For Divorce Online in Singapore Title approved by client: Halal Buffet & Bento/Packet Meals Event Caterer Singapore | Foodtalks
Google set our title: Foodtalks - Halal Buffet & Bento/Packet Meals Event Caterer Singapore Title approved by client: Child Care Centre in Singapore| Top Preschool | Carpe Diem
Google set our title: Carpe Diem: Child care Centre in Singapore| Top Preschool Every day, they are requesting me to update Google's title with their approved title. Also, asking me these questions.
Why did this happen?
Why didn't set their recommended title? Is there any way to set our approved titles? Please, help me to find the solution. ASAP Thanks in advance!0 -
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 -
Duplicate Content Regarding Translated Pages
If we have one page in English, and another that is translated into Spanish, does google consider that duplicate content? I don't know if having something in a different language makes it different or if it will get flagged. Thanks, Ruben
International SEO | | KempRugeLawGroup1 -
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 -
Massive jump in pages indexed (and I do mean massive)
Hello mozzers, I have been working in SEO for a number of years but never seen anything like a jump in pages indexed of this proportion (image is from the Index Status report in Google Webmaster Tools: http://i.imgur.com/79mW6Jl.png Has anyone has ever seen anything like this?
International SEO | | Lina-iWeb
Anyone have an idea about what happened? One thing that sprung to mind might be that the same pages are now getting indexed in several more google country sites (e.g. google.ca, google.co.uk, google.es, google.com.mx) but I don't know if the Index Status report in WMT works like that. A few notes to explain the context: It's an eCommerce website with service pages and around 9 different pages listing products. The site is small - only around 100 pages across three languages 1.5 months ago we migrated from three language subdomains to a single sub-domain with language directories. Before and after the migration I used hreflang tags across the board. We saw about 50% uplift in traffic from unbranded organic terms after the migration (although on day one it was more like +300%), especially from more language diversity. I had an issue where the 'sort' links on the product tables were giving rise to thousands of pages of duplicate content, although I had used the URL parameter handling to communicate to Google that these were not significantly different and only to index the representative URL. About 2 weeks ago I blocked them using the robots.txt (Disallow: *?sort). I never felt these were doing us too much harm in reality although many of them are indexed and can be found with a site:xxx.com search. At the same time as adding *?sort to the robots.txt, I made an hreflang sitemap for each language, and linked to them from an index sitemap and added these to WMT. I added some country specific alternate URLs as well as language just to see if I started getting more traffic from those countries (e.g. xxx.com/es/ for Spanish, xxx.com/es/ for Spain, xxx.xom/es/ for Mexico etc). I dodn't seem to get any benefit from this. Webmaster tools profile is for a URL that is the root domain xxx.com. We have a lot of other subdomains, including a blog that is far bigger than our main site. But looking at the Search Queries report, all the pages listed are on the core website so I don't think it is the blog pages etc. I have seen a couple of good days in terms of unbranded organic search referrals - no spike or drop off but a couple of good days in keeping with recent improvements in these kinds of referrals. We have some software mirror sub domains that are duplicated across two website: xxx.mirror.xxx.com and xxx.mirror.xxx.ca. Many of these don't even have sections and Google seemed to be handling the duplication, always preferring to show the .com URL despite no cross-site canonicals in place. Very interesting, I'm sure you will agree! THANKS FOR READING! 79mW6Jl.png0 -
Which hreflang tag to use for .eu domain
Hi there, We're trying to solve a problem with one of our domains, we have a .eu CCTLD and we're trying to implement hreflang tags. On our US and UK sites, we use "en-us" and "en-gb", but it's not clear how to approach this european problem, as there is not a "en-eu" tag. The site is in English, but serves several European countries speaking different languages. What's the best hreflang code to use in this situation? Any help much appreciated, Thanks!
International SEO | | dennis.globalsign0 -
How to fix the duplicate content problem on different domains (.nl /.be) of your brand's websites in multiple countries?
Dear all, what is the best way to fix the duplicate content problem on different domains (.nl /.be) of your brand's websites in multiple countries? What must I add to my code of websites my .nl domain to avoid duplicate content and to keep the .nl website out of google.be, but still well-indexed in google.nl? What must I add to my code of websites my .be domain to avoid duplicate content and to keep the .nl website out of google.be, but still well-indexed in google.nl? Thanks in advance!
International SEO | | HMK-NL3 -
Correct Hreflang & Canonical Implementation for Multilingual Site
OK, 2 primary questions for a multilingual site. This specific site has 2 language so I'll use that for the examples. 1 - Self-Referencing Hreflang Tag Necessary? The first is regarding the correct implementation of hreflang, and whether or not I should have a self-referencing hreflang tag. In other words, if I am looking at the source code for http://www.example.com/es/ (our Spanish subfolder), I am uncertain whether the source code should contain the second line below: Obviously the Spanish version should reference the English version, but does it need to reference itself? I have seen both versions implemented, with seemingly good results, but I want to know the best practice if it exists. 2 - Canonical of Current Language or Default Language? The second questions is regarding which canonical to use on the secondary language pages. I am aware of the update to the Google Webmaster Guidelines recently that state not to use canonical, but they say not to do it because everyone was messing it up, not because it shouldn't be done. So, in other words, if I am looking at the source code for http://www.example.com/es/ (our Spanish subfolder), which of the two following canonicals is correct? OR For this question, you can assume that (A) the English version of the site is our default and (B) the content is identical. Thanks guys, feel free to ask any qualifiers you think are relevant.
International SEO | | KaneJamison1