One SEO professional asked John Mueller if there were any negative implications to having duplicate URLs in your XML sitemap files?
Their question was: Can you have duplicate URLs with different attributes in your XML sitemap files? For example, one URL in one sitemap has an hreflang annotation, and the same URL in another sitemap may not have that annotation.
John explained that from Google’s perspective, this is just fine. This happens every now and then that some people have hreflang annotations in sitemap files, specifically separated away, and then they have a normal sitemap file for everything as well. And there’s some overlap here.
From Google’s perspective, they process the sitemap files as they can, so they can take all of that information into account.
And there is no downside to having the same URL in multiple sitemap files. The main problem is if you have conflicting information in the files.
For example, let’s say with hreflang annotations, this one is for Germany. Then another sitemap file might say “this page is also for France, or in French.” Then Google may be saying “what is happening here, we don’t know what to do with this kind of mix of annotations.”
Therefore Google will end up picking one or the other. Similarly, if you say this page has been last changed around 20 years ago ( which doesn’t make much sense), and another sitemap file might say five minutes ago, then Google will say something like “well, one of you is wrong. We don’t know which one, but perhaps we’ll follow one or the other. Or maybe we’ll ignore that last modified date entirely.”
So that’s something that you have to watch out for.
Otherwise, make sure that the sitemap files are all consistent with each other, and that they work together, and they don’t have conflicting annotations.
This happens at approximately the 16:38 mark in the video.
John Mueller Hangout Transcript
John (Question)
Let’s see, are there any negative implications to having duplicate URLs with different attributes in your XML sitemaps? For example, one URL in one sitemap with an hreflang annotation, and the same URL in another sitemap without that annotation.
John (Answer)
So maybe first of all, from our point of view, this is perfectly fine. This happens every now and then. Some people have hreflang annotations notations in sitemap files specifically kind of separated away, and then they have a normal sitemap file for everything as well. And there’s some overlap there. From our point of view, we process the sitemap files as we can and we take all of that information into account. There is no downside to having the same URL in multiple sitemap files. The only thing I would watch out for is that you don’t have conflicting information in the sitemap files.
So for example, if with the hreflang annotations, you’re saying, Oh, this page is for Germany. And then on the other sitemap file you’re saying, well, actually, this page is also for France, or in French. Then our systems might be like, what is happening here, we don’t know what to do with this kind of mix of annotations. And then it can happen that we pick one or the other. Similarly, if you say, this page has been last changed 20 years ago, which doesn’t really make much sense.
But like, say you say 20 years. And the other side might file you say, well, actually, it was five minutes ago, then our systems might look at that and say, well, like, one of you is wrong. We don’t know which one, maybe we’ll follow one or the other. Maybe we’ll just ignore that last modification date completely. So that’s kind of the thing to watch out for. But otherwise, if it’s just mentioned multiple sitemap files, and the information is either consistent or kind of works together, in that maybe one has the last modification date, the other as the hreflang annotations. That’s perfectly fine.