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
-
Problem to get multilingual posts indexed on Google
Last year on June I decided to make my site multi-lingual. The domain is: https://www.dailyblogprofits.com/ The main language English and I added Portuguese and a few posts on Spanish. What happened since then? I started losing traffic from Google and posts on Portuguese are not being indexed. I use WPML plugin to make it multi-lingual and I had Yoast installed. This week I uninstalled Yoast and when I type on google "site:site:dailyblogprofits.com/pt-br" I started seeing Google indexing images, but still not the missing posts. I have around 145 posts on Portuguese, but on Search Console it show only 57 hreflang tags. Any idea what is the problem? I'm willing to pay for an SEO Expert to resolve this problem to me.
International SEO | | Cleber0090 -
International SEO setup issues canonical URL
My site is www.grocare.com for one region and in.grocare.com for another region. Both of them have the same content except the currency for particular regions. Someone told me that google will take the content as duplicate and not rank either. I have setup hreflang and targeted different regions for both in the search console. I read many article which say canonical urls need to be setup for international seo sites. But Im not sure how to setup canonical urls and whether they are the right way to go . i just don't want my content deranked. Now i have setup hreflang properly after asking the moz community itself. So im hoping to get some help with this query too. TIA
International SEO | | grocare0 -
Google is still indexing with https,i removed ssl for my website
My website is claydip.com. I removed ssl for my website, but when i type claydip in google search it is still displaying with https and saying no description available..i lost visitors from search..kindly help me. I moved from bluehost to deamhost. I had a ssl at bluehost, when i move to dreamhost i am not using it.
International SEO | | knextweb8190 -
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:
International SEO | | peteboyd
<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!0 -
Duplicate content - news archive
Most of them are due to news items having more than 1 category – which is pretty normal.Also /us/blog, /uk/blog and /ca/blog are effectively the same page.None of them are actually duplicate content – just alternate URLs for the same pagehttp://www.fdmgroup.com/category/news/
International SEO | | fdmgroup0 -
Should I be deindexing pages with thin or weak content?
If I have pages that rank product categories by alphabetical order should I deindex those pages? Keeping in mind the pages do not have any content apart from product titles? For example: www.url.com/albums/a/ www.url.com/albums/b/ If I deindexed these pages would I lose any authority passed through internal linking?
International SEO | | Jonathan_Hatton0 -
E-Commerce site in 2 languages - Duplicate content or not?
How does Google view this? Our current site works like:
International SEO | | bjs2010
www.domain.com/EN - English
www.domain.com/ES - Spanish All products are the same, just different language and different URL for them - is this good or bad? I thought of either Going with .co.uk or .com for "English" and a .es for "Spanish"
OR Subdomaining it. www.es.domain.com and www.en.domain.com Any advice appreciated!0 -
Duplicated 404 Pages (Travel Industry)
Our website has creating numberous "future pages" with no alt tag or class tag that are showing up as 404 pages, To make matters worst, they are causing duplicate 404 pages because we have different languages. The visitors cant find the 404s but the searchbots can. Would it better to remove or add the links to robot.txt or add nofollow/noindex tag? This is an example. http://www.solmelia.com/nGeneral.LINK_FAQ http://www.solmelia.com/nGeneral.LINK_HOTELESDESTINOS_BODAS http://www.solmelia.com/nGeneral.LINK_CONDICIONES http://www.solmelia.com/nGeneral.LINK_MAPSITE http://www.solmelia.com/nGeneral.LINK_HOTELESDESTINOS_EMPRESA
International SEO | | Melia0