Is this setup of Hreflang xml sitemap correct?
-
Hi,
I'm trying to setup hreflang for 2 domains. One is purely a US site and the other domain has the language-country as subdomains.
For example:
http://www.websiteUSA.com (Targets English - USA)
https://www.websiteINT.com/en-CA (Targets English - Canada)
https://www.websiteINT.com/fr-CA (Targets French - Canada)
https://www.websiteINT/es (Targets Spanish)
..and so on and so forth for about 12 of these international URLs.
I created an XML sitemap that looks something like this:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>http://www.websiteUSA.com</loc></url></urlset>
<url><loc>https://www.websiteINT.com/en-CA</loc></url>
<url><loc>https://www.websiteINT.com/fr-CA</loc></url>
Question 1: Is this correct? In my actual file, I have all the countries listed and self-referencing.
Question 2: I'm hosting this file at https://www.websiteINT.com/hreflang.xml AND at http://www.websiteUSA.com/hreflang.xml. Is this correct?
Question 3: Will this help the SERPs direct english speakers from the US to http://www.websiteUSA.com while show SERPs for say English Speakers in Canada to https://www.websiteINT.com/en-CA?
Question 4: For some reason, when I put up the xml site, it only listed each URL once instead of the full XML file. Should I have uploaded a text file instead? It doesn't seem to render correctly.
Thank you!
-
Hi Gianluca, thanks for chiming in!
I will look into getting this setup. Should this solve our issue? It seems that currently, the hreflang setup for just the home page isn't working. Google is not showing the US site in Google US or showing the appropriate international site for Google in that specific country.
Any other tips? Hreflang setup for HTML will have to be applied for all pages, for all country-language sites, correct? Where does the canonical point to?
Lastly, if all of this is setup, do I remove country geo-targeting in Search Console?
Thanks!
-
I personally prefer hreflang set up in HTML code, especially because is much easier to verify and correct than when it is implemented in a sitemap file.
-
That's correct.
Long story - there is hreflang in HTML head and in xml sitemap. What's the difference? In HTML you can use same-site or cross-site links (between domains), in XML they are only in same domain. So in XML sitemap you can't use cross-site links (between different domains).
Also in SearchConsole you can set "international targeting" (SearchConsole -> Search Traffic -> International Targeting -> Country) for different sites.
I know that hreflang is little bit complicated but once you setup your first site correct then on next sites will be much faster.
-
Hi Peter,
Thanks for your reply!
What you're saying is that we cannot reference different domains in the hreflang xml sitemap, is that correct? How do I then, make sure that the english version of the International Site doesn't show up for English Speakers in the US? Are you saying that for the US site, I only need basically one hreflang tag and no references to any other URLs?
<url><loc>https://www.websiteUSA.com/</loc></url>
Here's the actual XML sitemaps that don't seem to be working according to the tested sitemap in Search Console. You can see the plain text there unless you view source code (as mentioned in Question 4).
- For the USA Site: http://www.shopcompex.com/hreflang-sitemap.xml
- For the International Sites: https://www.compexstore.com/hreflang-sitemap.xml
Do I need to just remove the USA domain from the International sitemap and all international domains from the USA sitemap?
I am getting an error in Search Console for both:
| This url is not allowed for a Sitemap at this location. |
Both referencing the different domains.
-
1. Look perfect. But i'm not sure that you can index in site X pages about site Y even in hreflang. You need to make test on some site. Please note - there is cross site canonical tag and this is ok. There is cross site alternate hreflang and this is ok. But i don't know about sitemap with links to other sites even in hreflang. You need to verify this in SearchConsole - upload sitemap and see for some warnings or errors there. Also don't forget that setup hreflang in HTML code too -> https://sites.google.com/site/webmasterhelpforum/en/faq-internationalisation#q16 https://moz.com/learn/seo/hreflang-tag https://moz.com/blog/hreflang-behaviour-insights
2. Answer of this dependent from "validation" of previous question - can you setup sitemap of site X with links to site Y. IMHO you can't. So you must put sitemap about int.com to int.com site and usa.com on same site. Like your example and this is for usa.com site:
<url><loc>https://www.websiteUSA.com/</loc></url>3. Yes, should be.
"Hreflang tags may not help you increase traffic; instead, the goal of using them is to serve the right content to the right users. They help search engines swap the correct version of the page into the SERP based on a user's location and language preferences. For information on how geotargeting can help with rankings, learn about ccTLDs."
https://moz.com/learn/seo/hreflang-tag4. Can you show me this? Because your sitemap may miss XSL for showing proper. Or you may return different HTTP content type.
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
-
Targeting/Optimising for US English in addition to British English (hreflang tags)
Hi, I wonder if anyone can help? We have an e-commerce website based in the UK. We sell to customers worldwide. After the UK, the US is our second biggest market. We are English language only (written in British English), we do not have any geo-targeted language versions of our website. However, we are successful in selling to customers around the world on a regular basis. We have developers working on a new site due to launch in Winter 2021. This will include a properly managed site migration from our .net to a .com domain and associated redirects etc. Management are keen to increase sales / conversions to the US before the new site launches. They have requested that we create a US optimised version of the site. Maintaining broadly the same content, but dynamically replacing keywords: Example (clothing is not really what we sell): Replacing references to “trainers” with “sneakers”
International SEO | | IronBeetle
Replacing references ‘jumpers with “sweaters”
Replacing UK phone number with a US phone number It seems the wrong time to implement a major overhaul of URL structure, considering the planned migration from .net to .com in the not too distant future. For example I’m not keen to move British English content on to https://www.example.com/en-gb Would this be a viable solution: 1. hreflang non-us visitors directed to the existing URL structure (including en-gb customers): https://www.example.com/
2. hreflang US Language version of the site: https://www.example.com/en-us/ As the UK is our biggest market It is really important that we don’t negatively affect sales. We have extremely good visibility in SERPS for a wide range of high value/well converting keywords. In terms of hreflang tags would something like this work? Do we need need to make reference to en-gb being on https://www.example.com/ ? This seems a bit of a ‘half-way-house’. I recognise that there are also issues around the URL structure, which is optimised for British English/international English keywords rather than US English e.g. https://www.example.com/clothing/trainers Vs. https://example.com/clothing/sneakers Any advice / insight / guidance would be welcome. Thanks.0 -
Hreflang implementation via sitemap - don’t need canonical tags?
Hi, Quick easy question here I hope! An international site has hreflang and canonical tags in page head sections and also hreflang in the sitemap so I can see one version needs removing. The head section versions are relative URLs and need updating so think we will keep the sitemap hreflangs instead. If the sitemap implementation is going to be used (sitemap auto-updates when changes are made to pages so seems easier to do this way) am I right in thinking No canonical tags are needed at all (and can safely be removed from head section too?). Pretty sure links included in sitemap are assumed to be canonicals, or any issues with this approach? Will be using x-default for the default language version of homepage too.
International SEO | | MMcCalden0 -
Herflang sitemap
I use country and language codes in my website Can i have a herflang sitemap with language code only?
International SEO | | MTBE0 -
International SEO & Duplicate Content: ccTLD, hreflang, and relcanonical tags
Hi Everyone, I have a client that has two sites (example.com & example.co.uk) each have the same English content, but no hreflang or rel="canonical" tags in place. Would this be interpreted as duplicate content? They haven't changed the copy to speak to specific regions, but have tried targeting the UK with a ccTLD. I've taken a look at some other comparable question on MOZ like this post - > https://moz.com/community/q/international-hreflang-will-this-handle-duplicate-content where one of the answers says **"If no translation is happening within a geo-targeted site, HREFLANG is not necessary." **If hreflang tags are not necessary, then would I need rel="canonical" to avoid duplicate content? Thanks for taking the time to help a fellow SEO out.
International SEO | | ccox10 -
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 -
Multilingual Sitemap with some non-matching URLs
The website has two languages, English (.com/en-int/) and French (.com/fr-fr/). Some pages only exist in French, and some only in English, but there are many that are a 1-to-1 match. So, my questions is, in the multilingual sitemap, should I only include the URLs that are alternates, and then create a 2nd sitemap for all non-matching URLs? Or should I have 3 sitemaps: 1) Multilingual sitemap for all matching URLs (https://support.google.com/webmasters/answer/26208650 , 2) English sitemap for only URLs not included in multilingual sitemap, 3) French sitemap for only URLs not included in multilingual sitemap. And then create a sitemap index file to link to all 3 sitemaps.
International SEO | | Alex.Weintraub0 -
External URLs in hreflang sitemap questions
I'm currently putting together an international sitemap for a website that has an set up like the following: example.com/us
International SEO | | Guyboz
example.com/au
example.com/ca
example.co.uk
example.se I'm planning on including the hreflang tags within sitemaps for each domain, to make sure google serves up the right version. However, I'm a bit sceptical about including the non .com domains within the .com sitemap - and the other way round for .co.uk and .se sitemaps. The way I've been doing it follows the following example: <url><loc>http://www.example.com/us/</loc></url> Putting in the .co.uk and .se domains within the .com sitemap just doesn't feel right - is this actually the right way to do it? Thanks in advance 🙂0 -
Ranking well internationally, usage of hreflang, duplicate country content
I'm trying to wrap my head around various options when it comes to international SEO, specifically how to rank well in countries that share a language, and the risk of duplicate content in these cases. We have a chance to start from scratch because we're switching to a new e-commerce platform, and we were looking into using hreflang. Let's assume an example of a .com webshop that targets both Austria and Germany. One option is to include both language and region in the URL, and mark these as such using hreflang: webshop.com/de-de/german-language-content (with hreflang de-de)
International SEO | | DocdataCommerce
webshop.com/de-at/german-language-content (with hreflang de-at) Another option would be to only include the language in the URL, not the region, and let Google figure out the rest: webshop.com/de/german-language-content (with hreflang de) Which would be better? The risk of inserting a country, of course, is that you're introducing duplicate content, especially since for webshops there are usually only minor differences in content (pricing, currency, a word here and there). If hreflang is an effective means to make sure that visitors from each country get the correct URL from the search engines, I don't see any reason not to use this way. But if search engines get it wrong, users will end up in the wrong page and will have to switch country, which could result in conversion loss. Also, if you only use language in the URL, is it useful at all to use hreflang? Aren't engines perfectly able to recognize language already? I don't mention ccTLDs here because most of the time we're required to use a .com domain owned by our customer. But if we did, would that be much better? And would it still be useful to use hreflang then? webshop.de/german-language-content (with hreflang de-de)
webshop.at/german-language-content (with hreflang de-at) Michel Hendriks
Docdata Commerce0