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
-
Baidu Webmaster Tools: How to setup in "Site Properties" the field "Affiliate subject"?
Hi ,
International SEO | | lcourse
finally I managed to setup my site in Baidu Webmaster Tools with the help of a freelance staff member in China. Site is verified and sitemap submitted. In section "Site Properties", field "Affiliate subject" I can't figure out after extensive search what I need to setup here for a foreign company without any presence and without company registration in China. Anybody can help? When I click on this field, it indicates "Site association subject is a necessary link for mobile resources to enter search." so my site will not show up in mobile results without it? Grateful for any tips on how to resolve this piece of puzzle of the baidu setup.
Thanks0 -
Hreflang missing
Hi everybody, I cannot find the hreflang in the source code neither in the sitemaps but Google search console is showing me the tag. Did anyone have this problem? Or does anyone know how to check it? I scanned the site and no tool detected the hreflang in it. Thank you.
International SEO | | poliedric0 -
Hreflang tags
I know these are intended for specifying different language/regional versions of one site, but can they be used to specify just ONE country (eg. "en-au")? Or does it only work to specify an ALTERNATIVE to another language/region variation?
International SEO | | muzzmoz0 -
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 -
Can you target the same site with multiple country HREFlang entries?
Hi, I have a question regarding the country targeting aspect of HREFLANG. Can the same site be targeted with multiple country HREFlang entries? Example: A global company has an English South African site (geotargeted in webmaster tools to South Africa), with a hreflang entry targeted to "en-za", to signify English language and South Africa as the country. Could you add entries to the same site to target other English speaking South African countries? Entries would look something like this: (cd = Congo, a completely random example) etc... Since you can only geo-target a site to one country in WMT would this be a viable option? Thanks in advance for any help! Vince
International SEO | | SimonByrneIFS0 -
What is the best way to generate an automatic sitemap for google, bing and yahoo?
Hi guys, I have 3 international sites So far I recieved a Sitemap that was generated by an seo company to use and submit to google, for our co.nz domain, I have been told to submit this also to bing and yahoo. Can anyone tell me if I can submit the same sitemap for the com.au and com or would i need to generate a new sitemap for each domain? I have been told, everytime we change content we have to keep submitting, is there a way to do this autmatically as we will be writting alot of content daily. Any recommendations or suggestions?
International SEO | | edward-may0 -
Help with hreflang configuration
We currently have different country versions of our site with a hreflang configuration; we have a spanish site targeted for Spain and then different subdirectories for every latin american country we're targeting to. Other than minimal differences, at the moment they are similar until we can handle providing unique content for each country. Our goal, then, would be to show the right one for every Google version, but also to avoid penalties. Our configuration is like this: ... Do you reckon this would be the right approach? Moz is currently telling us that there's duplicate content between the different country subdirectories, and to an extent there is, does that correlate with Google penalizing us for it? Also I've seen examples of self-referential alternates (such as including the in the Mexican version), or to put the canonical referencing the primary http://www.example.com/, will any of this help to our goals? Thanks a lot!
International SEO | | doctorSIM0 -
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