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 -
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 -
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 -
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 problem?
Hello, We do have a client with a site in multiple versions (one domain per country). French and Spanish versions work really fine, but the problem comes up with the .com and .co.uk versions. This is my hreflang piece of code: When I go to Google.co.uk and search the exact match domain keyword "how much cost an app", I only find the howmuchcostanapp.com domain (1st or 2nd page) instead of howmuchcostanapp.co.uk. The UK one is not appearing! This is very strange. I have spent a lot of time trying to solve this, but I don't know what else to do. Thanks a lot in advance for your comments and help!
International SEO | | Yeeply.com0 -
Hreflang vs canonical
I'm having an international Drupal website and the hreflang module is in use. However, I'm still not sure how to optimize the pages. Perhaps it's easier to ask with an example **International: **www.example.com/products/product1
International SEO | | Teklan
Here we have the master content of the product **US: **www.example.com/us/products/product1
Here we have exactly the same content as international. Nothing is localized. **UK: **www.example.com/uk/products/product1
Here we have almost the same content as on International. Here and there some local terms and extra text. **German: **www.example.com/de/products/product1
Here we have a translated version of the international page. Questions Do I add hreflang from all to all pages + to itself? Where do I add canonicals? How should I optimize the content on the US and UK pages?0 -
"Hreflang=x" tag and multinational websites
Hello, We have multiple websites targeted at multiple countries and languages, each with the correct country extension. We have a corporate blog for each of these websites, where the blogs are subdomains of the main website. Currently we have a process of rewriting our blog posts completely – while keeping the same subjects – in order to have original content on each of our blogs, although we have up to 3 blogs in the same language. These are the languages we target: French – FRANCE French – SWITZERLAND French – BELGIUM Italian – ITALY Italian – SWITZERLAND German – GERMANY German – SWITZERLAND German – AUSTRIA Spanish – SPAIN Spanish – COLOMBIA Spanish – PANAMA Czech – CZECH REPUBLIC Swedish – SWEDEN Dutch – BELGIUM / NETHERLANDS English – UK English – INTERNATIONAL The process is obviously very tedious, and not always applied rigorously – i.e. some of the texts are posted on 2-3 different blogs, creating duplicate content.
International SEO | | ESL_Education
The questions : Would there be any reason for us to privilege the use the rel="canonical" tag over the "hreflang=x" tag, thus giving privilege to a "master" version for each language? Are there any risks in using the "hreflang="x" tag for our blogs considering that the posts would be very similar, except for references to additional content? Could there be any risk that Google would consider our sites as duplicate content after all? Should we specify on each blog that we have all the above versions, or should we only specify the other markets versions in each language? For example, should we specify on our French, Swiss and Belgium blog that we have 3 different French versions, on our UK blog that we also have an international version, and so on, or should we list all versions on each of the blogs? Does the "hreflang="x" tag facilitate the indexation of each of the versions in the SERPs of their targeted market? Lastly, are there any precautions we should take in order to put this in place? Looking forward to your feedback. Best wishes, Maëlle0 -
Geographical targeting and rel=”alternate” hreflang=”x”
Let me paint you a picture, a site attempts geographical targeting by using sub-directories. However, 'targeting' is used loosely in this case. One sub-directory targets the US, the other is for everywhere else. For example: example.com/us/ <-- US example.com/en/ <--- Everywhere else The homepage is a map, they get taken to the US site if they click on US, they get the other site if they click anywhere else. The site is effectively duplicated in both folders, the only difference being one is written in US English, the other in UK English. So, while I am able to set the preferred geo in Google Webmaster tools for the US site, I can't for the everything else site. Recently I came across rel=”alternate” hreflang=”x” and thought it may be useful. Does anyone know if I can specify more than one language per URL using this method? For example using multiple instances such as: Is this possible at all? Thanks in advance, and I'm open to any other suggestions! 🙂
International SEO | | David_ODonnell0