How to implement multilingual sitemaps when not all pages have translations
-
We are trying to implement sitemaps for a site that has localized content for a few countries. We’ve concluded that we should utilize
sitemapindex
and then create one sitemap per country. Now to the problems we’re facing.Not all urls on the site have translations, how should these urls be presented in the sitemap? Should they be stated simply like so?
<url><loc>https://example.com/sdfsdf</loc></url>
So urls with the hreflang attribute and without are mixed in the same sitemap, or is that a problem? (I have added empty rows to make it easier to read)
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" <br="">xmlns:xhtml="http://www.w3.org/1999/xhtml"></urlset>
<url><loc>http://www.example.com/english/page.html</loc>
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/page.html"><xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/page.html"><xhtml:link rel="alternate" hreflang="en" href="http: www.example.com="" english="" page.html"=""></xhtml:link rel="alternate" hreflang="en" href="http:></xhtml:link></xhtml:link></url><url><loc>http://www.example.com/page-with-no-translations</loc></url>
<url><loc>http://www.example.com/page-with-no-translations2</loc></url>
<url><loc>http://www.example.com/page-with-no-translations3</loc></url>
<url><loc>http://www.example.com/deutsch/page.html</loc>
<xhtml:link rel="alternate" hreflang="de" href="http://www.example.com/deutsch/page.html"><xhtml:link rel="alternate" hreflang="de-ch" href="http://www.example.com/schweiz-deutsch/page.html"><xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/english/page.html"></xhtml:link rel="alternate"></xhtml:link></xhtml:link></url> -
I continued to think about the matter and thought of this approach for adding the pages with no localization to the multilingual sitemap (just putting it here):
<url><loc>https://example.com/page-with-no-localization</loc></url>
Or is it better to put a simple link to the page in the sitemap?
<url><loc>https://example.com/page-with-no-localization</loc></url>
-
Additional question about which parts should go into which sitemap. The url https://example.com/us/driver-guides/railroad-crossings has 3 "translations". Where should all these <url>elements go? We've used a Google sheet provided by Ahrefs to create these. </url>
This one is for
us
so it should be put in theus
sitemap? (sorry about the code block being single line, I don't understand why they're not multi line)<loc>https://example.com/us/driver-guides/railroad-crossings</loc>
This one is for
uk
so it should be put in theuk
sitemap?<loc>https://example.com/uk/car/level-crossings</loc>
This one is for
se
so it should be put in these
sitemap?This one is the same as the first one. I assume it's for the "x-default" attribute. Where should it be put?
<loc>https://example.com/us/driver-guides/railroad-crossings</loc>
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
-
Upgrade old sitemap to a new sitemap index. How to do without danger ?
Hi MOZ users and friends. I have a website that have a php template developed by ourselves, and a wordpress blog in /blog/ subdirectory. Actually we have a sitemap.xml file in the root domain where are all the subsections and blog's posts. We upgrade manually the sitemap, once a month, adding the new posts created in the blog. I want to automate this process , so i created a sitemap index with two sitemaps inside it. One is the old sitemap without the blog's posts and a new one created with "Google XML Sitemap" wordpress plugin, inside the /blog/ subdirectory. That is, in the sitemap_index.xml file i have: Domain.com/sitemap.xml (old sitemap after remove blog posts urls) Domain.com/blog/sitemap.xml (auto-updatable sitemap create with Google XML plugin) Now i have to submit this sitemap index to Google Search Console, but i want to be completely sure about how to do this. I think that the only that i have to do is delete the old sitemap on Search Console and upload the new sitemap index, is it ok ?
Technical SEO | | ClaudioHeilborn0 -
New site: More pages for usability, or fewer more detailed pages for greater domain authority flow?
Ladies and gents! We're building a new site. We have a list of 28 professions, and we're wondering whether or not to include them all on one long and detailed page, or to keep them on their own separate pages. Thinking about the flow of domain authority - I could see 28 pages diluting it quite heavily - but at the same time, I think having the separate pages would be better for the user. What do you think?
Technical SEO | | Muhammad-Isap1 -
Hreflang Implementation
Hello All, I'm currently working on a website with different folders for different country. For now I have defined the href lang implementation as below: http://www.homepage.com/en/default.html"/>
Technical SEO | | buiserik
Language: English - Country: United Kingdom http://www.homepage.com/enus/default.html"/>
Language: English - Country: United States http://www.homepage.com/nl/default.html"/>
Language: Dutch - Country: Netherlands http://www.homepage.com/nlbe/default.html"/>
Language: Dutch - Country: Belgium http://www.homepage.com/fr/default.html"/>
Language: French - Country: All french speaking countries http://www.homepage.com/de/default.html"/>
Language: German - Country: All german speaking countries http://www.homepage.com/es/camisa-a-medida.html"/>
Language: Spanish - Country: Spain http://www.homepage.com/enen/default.html" />
Language: English - Country: All other countries Does this make any sense? Furthermore, how do I implement this on underlying pages. Do I fill out the URL dynamically according to the URL the tags are found on? Or do I use these tags mentioning the homepage on all underlying pages? If so, how do I avoid duplicate content issues between NL and NL-BE and EN-GB, EN-US and EN? Canonicals? Besides the whole hreflang implementation I was wondering if it's worthwhile or advisable to implement lang="en" xml:lang="en_"_ in the HTML tag and http-equiv="content-language" content="en_"_ in the META tags?0 -
How Google sees my page
When looking for crawlability issues, what is the difference between using webmaster tools Fetch as google, looking at the cached pages in google index site:mypage.com, or using spider simulator tools.
Technical SEO | | shashivzw0 -
Pages with Duplicate Page Content Crawl Diagnostics
I have Pages with Duplicate Page Content in my Crawl Diagnostics Tell Me How Can I solve it Or Suggest Me Some Helpful Tools. Thanks
Technical SEO | | nomyhot0 -
Page Content
Our site is a home to home moving listing portal. Consumers who wants to move his home fills a form so that moving companies can cote prices. We were generating listing page URL’s by using the title submitted by customer. Unfortunately we have understood by now that many customers have entered exactly same title for their listings which has caused us having hundreds of similar page title. We have corrected all the pages which had similar meta tag and duplicate page title tags. We have also inserted controls to our software to prevent generating duplicate page title tags or meta tags. But also the page content quality not very good because page content added by customer.(example: http://www.enakliyat.com.tr/detaylar/evden-eve--6001) What should I do. Please help me.
Technical SEO | | iskq0 -
Duplicate Page Title
Our pages has so many DUPLİCATE PAGE TİTLE
Technical SEO | | iskq
I want to change all of them, is it right way?0 -
Duplicate Page Issue
Dear All, I am facing stupid duplicate page issue, My whole site is in dynamic script and all the URLs were in dynamic, So i 've asked my programmer make the URLs user friendly using URL Rewrite, but he converted aspx pages to htm. And the whole mess begun. Now we have 3 different URLs for single page. Such as: http://www.site.com/CityTour.aspx?nodeid=4&type=4&id=47&order=0&pagesize=4&pagenum=4&val=Multi-Day+City+Tours http://www.tsite.com/CityTour.aspx?nodeid=4&type=4&id=47&order=0&pagesize=4&pagenum=4&val=multi-day-city-tours http://www.site.com/city-tour/multi-day-city-tours/page4-0.htm I think my programmer messed up the URL Rewrite in ASP.net(Nginx) or even didn't use it. So how do i overcome this problem? Should i add canonical tag in both dynamic URLs with pointing to pag4-0.htm. Will it help? Thanks!
Technical SEO | | DigitalJungle0