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
-
How should I handle hreflang tags if it's the same language in all targeting countries?
My company is creating an international version of our site at international.example.com. We are located in the US with our main site at www.example.com targeting US & Canada but offering slightly different products elsewhere internationally. Ideally, we would have hreflang tags for different versions in different languages, however, it's going to be an almost duplicate site besides a few different SKUs. All language and content on the site is going to be in English. Again, the only content changing is slightly different SKUs, they are almost identical sites. The subdomain is our only option right now. Should we implement hreflang tags even if both languages are English and only some of the content is different? Or will having just canonicals be fine? How should we handle this? Would it make sense to use hreflang this way and include it on both versions? I believe this would be signaling for US & Canda visitors to visit our main site and all other users go to the international site. Am I thinking this correctly or should we be doing this a different way?
International SEO | | tcope250 -
GeoIP Redirects & hreflang
Hello, We believe we've had some issues with hreflang tags not remaining validated due to the implementation of geoIP redirects. Previously, if a user clicked a landing page on Google search that was not targeted for their territory, they would instantly be redirected to a sub path that targets their territory using geoIP redirects. We're planning to remove the initial geoIP redirects and have messaging that prompts the user to either stay on the page they've landed on, or be redirected to page that is right for their territory. However, if a user has selected to be redirected to a sub path that is targeted for their territory, they will have a cookie preference set for the IP location they've selected, and will continue to be redirected to their chosen sub path. My question is, will a crawler follow and trigger the geo preference cookie, which could potentially cause complexities in validating hreflang tags and ranking of content for the right market. Thanks.
International SEO | | SEONOW1230 -
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 -
Hreflang link is always going to the homepage
Hey there fellow Mozzers, I'm currently performing some work for a webshop which is located at two different TLD's.
International SEO | | WesleySmits
example.com and example.nl. In the head of both websites the hreflang tags have been added to tell Search Engines which site is targeted at which country. That's good 🙂 However, the hreflang links are pointing to the homepages of both websites from every page on the websites. Isn't example.nl/blog/ not supposed to link the hreflang tag to example.com/blog/?0 -
Will website with tag hreflang pass link juice to other country/language version of website?
For example, I have a website XXX.com and I made hreflang tags to other country/language versions of website: ru.XXX.com (for Russia/Russian) XXX.com.ua (for Ukraine/Russian) ua.XXX.com (for Ukraine/Ukraine) Then I will acquire links to XXX.com. The question is: will XXX.com pass link juice to websites ru.XXX.com, XXX.com.ua and ua.XXX.com. Will these websites rank in their countries if I will acquire links ONLY to XXX.com? I looked at https://support.google.com/webmasters/answer/189077?hl=en, but haven't found what google think about that. Thank you in advance. I will appreciate your help.
International SEO | | Kabanchik0 -
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 -
Links metrics & rel="alternate" hreflang="x"
Bonjour! If with rel="alternate" hreflang="x" we can indicate to Google that an URL have translated equivalents of a page, are the links metrics splited between all pages or Google considers all the pages as only one? Thanks! Maxime
International SEO | | Maxoulala0 -
Export sitemap or internal linking structure in a visual diagram?
Is there a FREE ONLINE tool that will Export a existing sitemap or internal linking structure in a visual diagram? I'm trying to help my clients see there existing sitemaps in a visual document and show how each page links to the next. Is there a FREE ONLINE tool that does this?
International SEO | | splashmedia0