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 -
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 -
Sitemap issue
On this link you can see the sitemap: http://bit.ly/2XC9J5G.
International SEO | | vanGoGh-creative
I don't understand what the error is.
From the search console I have the following indication: "The XML Sitemap cannot be analyzed because it contains one or more prefixes of the unassociated namespace. For example, the error is generated when xhtml:linknot preceded by xmlns:xhtml="http://www.w3.org/1999/xhtml" is detected in a Sitemap.
Will you help me, please solve?
Thank you very much.</xhtml:link> Massimiliano0 -
Which pages to put hreflang on?
Hi, we are running a site which is a directory consisting of numbers of phone spammers. It contains descriptions, comments and so on. We are currently present in 9 countries. The websites all have the same structure, but, of course, the spam numbers in each country are different ones. If I want to tell Google that our website is available is several locations/languages, do I only put my hreflang tag on the start page then? Thanks
International SEO | | Roverandom
Thomas0 -
Is it compulsory to use hreflang attribute for Multilingual site? What if I do not use such tag?
Hello Everybody, My main site - abcd.co.uk and other sites are like this se.abcd.co.uk, fr.abcd.co.uk, es.abcd.co.uk etc Now if I donot use hreflang for Multilingual site then google will consider it as subdomain or duplicate site? But content of the sites are in different language. Thanks!
International SEO | | wright3350 -
Alternate Hreflang Problem
We have two travel websites.
International SEO | | Izzet
One in English language for people living in the UK.
One in Turkish language for people living in Turkey. The major difference is:
English (UK) website shows 4+ nights accomodation prices because UK travellers never come for less than 4 nights.
Turkish website shows 1-night, 2-night, 3-night prices because Turkish travellers never stay for more than 3 nights. We are using rel="alternate" hreflang="x" tags properly on our two websites. Today, I am disappointed to see Google display the wrong result. When a user in Turkey searches a Turkish keyword on Google.com.tr;
Google is showing the English language website. When I click on Search Settings > Language;
I see that English is selected under this question:
"Which language should Google products use?" This is a big problem for us.
Many rich users in Turkey, who are more willing to buy our services, speak English fluently and they may choose to use Gmail in English. But we are losing business because these Turkish customers don't convert at all on the Enlish (UK) website because of the reason I explained above. 1) What can we do?
2) If we remove the rel="alternate" hreflang="x" tags now, will it hurt any of the websites?
We have seen an increase in Google rankings for the Turkish language website after using rel="alternate" hreflang="x" tags. Izzet0 -
Can multiple hreflang tags point to one URL? International SEO question
Moz, Hi Moz, Can multiple hreflang tags point to a single URL? For example, if I have a Canadian site (www.example.com/ca) that targets French and English speakers can I have the following: or would I use: Any insight would be very helpful and greatly appreciated! Thank you in advance!
International SEO | | DA20131 -
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