General questions about implementing hreflang using XML sitemap
-
I created another thread regarding hreflang sitemaps. However, this one is more general and doesn't cover multiple sitemaps for different localizations so I think it's reasonable creating a new thread.
We are trying to implement hreflang using XML sitemap. We have localized content for a few countries, but only 1/3 of the content is 'duplicate' localized content.
How should this be presented in the sitemap? Can we have some urls with hreflang-tags and some without?
Also, where should this be located? In the usual sitemap file at site.com/sitemap.xml or should we create a different sitemap site.com/hreflang.xml where we just paste all hreflang-info? And if it should be in /hreflang.xml - can we have the same URL twice (in both current sitemap and hreflang sitemap)?
-
This feature was introduced by Google. It is also supported by Yandex. The only difference I've noticed is that Yandex doen't like BOM in the sitemap encoding, while Google is OK with BOM. I'm not sure about Bing or any other search engines.
-
Hey @Victor Celer. What do you mean by Google specific?
-
Anyone that knows the answer to this? If we place all our hreflangs into a separate sitemap, /hreflang.xml - can we have the same URL in both sitemaps but it's simple in the general sitemap and contains hreflang information in the second. Like so:
In /sitemap.xml
<url><loc>http://www.example.com/english/page.html</loc></url>
Same url in /hreflang.xml
<url><loc>http://www.example.com/english/page.html</loc></url>
-
Thank you very much @Victor Celer. It's much appreciated that you take the time to help us out.
-
The last URL entry is a duplicate of the first one. Everything else looks fine.
Keep in mind that this feature is Google specific. Other search engines may not understand this format.
-
Thank you. Would this be the correct way of doing it?
<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> -
Exactly, you can add the hreflang properties for some URLs, if necessary. Examples.
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
-
Ajax Pagination in Magento Question
Hi, We just launched our new theme for Magento and my developer stated the pagination uses Ajax. Previously I had the developers set up rel prev/next for all our pages (categories/ecommerce site) that had multiples. He said it's not required with Ajax. Is this correct? Example: https://www.bestpricenutrition.com/whey.html and when you go to Page 2, the URL shows: https://www.bestpricenutrition.com/whey.html? I want to make sure these pages are set up correctly.
Technical SEO | | vetofunk0 -
Hi - I have a question about IP addresses
- would it hurt link juice to host a blog on a different server to the rest of your website? I have a web host saying they can't run Wordpress as they won't support PHP for "security reasons" - one solution would be to set up Wordpress on a different server and redirect domain.com/blog there (I presume this is do-able?). But I don't know if that affects the SEO adversely?
Technical SEO | | abisti21 -
My video sitemap is not being index by Google
Dear friends, I have a videos portal. I created a video sitemap.xml and submit in to GWT but after 20 days it has not been indexed. I have verified in bing webmaster as well. All videos are dynamically being fetched from server. My all static pages have been indexed but not videos. Please help me where am I doing the mistake. There are no separate pages for single videos. All the content is dynamically coming from server. Please help me. your answers will be more appreciated................. Thanks
Technical SEO | | docbeans0 -
International Config in a WP Multisite environment: GWT, Yoast, Hreflang, SiteMaps etc ?
Hi If setting up on a WP multisite environment using Yoast seo plugin how should you: 1) Geotarget in GWT - set up a profile for the different tlds OR the network.domain.com different subfolders ? 2) Set up hreflang sitemaps - can Yoast handle this or anything manual need to be done such as disabling Yoast and creating a bespoke site map with hreflang ? Would this plug in help: https://wordpress.org/plugins/language-selector-related/ 3) Any other ideas or recommendations for setting up geotrageting correctly using WP Multisite ? Thanks Dan
Technical SEO | | Dan-Lawrence0 -
Type of sitemap
I have a client with a large sitemap in html for his web shop. I am wondering though if i would be better to have a xml sitemap for Google. Is there any advantage in type of sitemap?
Technical SEO | | auke18100 -
Use of Multiple Tags
Hi, I have been monitoring some of the authority sites and I noticed something with one of them. This high authority site suddenly started using multiple tags for each post. And I mean, loads of tags, not just three of four. I see that each post comes with at least 10-20 tags. And these tags don't always make sense either. Let's say there is a video for "Bourne Legacy", they list tags like bourne, bourney legacy, bourne series, bourne videos, videos, crime movies, movies, crime etc. They don't even seem to care about duplicate content issues. Let's say the movie is named The Dragon, they would inclue dragon and the-dragon in tags list and despite those two category pages(/dragon and /the-dragon) being exactly the same now, they still wouldn't mind listing both the tags underneath the article. And no they don't use canonical tag. (there isn't even a canonical meta on any page of that site) So I am curious. Do they just know they have a very high DA, they don't need to worry about duplicate content issues? or; I am missing something here? Maybe the extra tags are doing more good than harm?
Technical SEO | | Gamer070 -
Remove a directory using htaccess
Hi, Can someone tell me if there's a way using htaccess to say that everything in a particular directory, let's call it "A", is gone (http 410 code)? i.e. all the links should be de-indexed? Right now, I'm using the robots file to deny access. I'm not sure if it's the right thing to do since Google webmaster tools is showing me the link as indexed still and a 403 error code. Thanks.
Technical SEO | | webtarget0 -
Which is the best wordpress sitemap plugin
Does anyone have a recommendation for the best xml sitemap plugin for wordpress sites or do you steer clear of plugins and use a sitemap generator then load it up to the root manually?
Technical SEO | | simoncmason0