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 Google Is Changing our Title Tags?
Hi fellow Moz SEOs, Need your URGENT help! We set an optimised title for our client websites. These titles are approved by our clients. When they checked on Google, noticed the title was not the same. They notified me about this issue. The title looks fine when I checked the source code. Why Google set our title differently? For example: Title approved by client: Heart Specialist Clinic Singapore | Cardiology Clinic | Dr. Lim Ing Haan
International SEO | | Verz
**Google set our title: **Dr. Lim Ing Haan: Heart Specialist Clinic Singapore ... Title approved by client: Hernia Surgery Singapore | Arden JR Surgery
**Google set our title: **Arden JR Surgery: Hernia Surgery Singapore Title approved by client: Top Specialist Divorce & Family Lawyer - Yeo & Associates LLC
Google set our title: Yeo & Associates LLC: Top Specialist Divorce & Family Lawyer 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 -
Using same URL for both "en" and "en-us" hreflang tags
Hi,I have a question. Is it okay if I use the same URL for both "en" and "en-us" hreflang tags? For example, for my en-us page: Is this okay with Google? What are your thoughts on this?
International SEO | | Avid_Demand0 -
Is It valuable to use hreflang tags for blog posts?
I realize it's important to use hreflang tags when your site is translated into multiple languages and that content is very similar if not identical to the original language. However, is there value in having hreflang tags implemented for every blog post that gets translated? Does the same value hold true? In my case, the blog posts which get translated into different languages can somewhat vary from the original. By no means are they a direct translation. They are often adapted to meet the needs of that language and audience.
International SEO | | UnbounceVan0 -
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 -
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 -
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 -
Multiple hreflang tags
I'm trying to advise on the multi country seo for a site in terms of markup. We've already decided on using sub folders rather than separate sites or subdomains due to an established link profile and good rankings in all countries. The question is in relation to the homepage. Obviously this is the page most likely to rank well in any country (the site is a .com). But can multiple hreflang tags be put on the page to say that the page targets many countries? Or would leaving the hreflang tag off allow it to just rank for all countries? Also do Yahoo and Bing follow hreflang tags? I can't find any info on this anywhere! Thanks very much in advance for any help!
International SEO | | Bdig0 -
Looking for content writers for multi-language SEO
Hi All, I'm currently doing a lot of work for a UK client who has multiple sites outside the UK (all part of the same business). We're currently discussing the option of us handling all of his SEO for his German, French, Spanish and Italian sites too, but we only have access to one person in the office who can speak French and Spanish. They're currently booked up on other jobs that we can't really move them off, so I'm looking for options of outsourcing some of the content writing. My question is, does anyone know of any high quality content writing services that have writers available to write for the countries languages above? We're going to focus initially on their on-site strategy and building up their high quality content. At the moment, they don't have much relevant content on their website, so we're going to initially look at this. Moving forward, we'll be looking at their off-site strategy and trying to find areas to submit high quality articles, look at guest blogging and PR opportunities. Any tips anyone has on this side (in terms of outsourcing to native speakers) would be quite useful too! Many thanks,
International SEO | | PinpointDesigns
Lewis0