How should a sitemap handle alternative URLs for the same page?

ProcrustesPR

When the same article has URLs both with and without a slug, the supplied public discussions recommend listing only the chosen canonical URL in the sitemap, not both versions. Whichever version you choose, keep the sitemap consistent with your canonicalization settings. A sitemap alone cannot establish the canonical version or guarantee crawling or indexing outcomes.

ProcrustesPRProcrustesPRHow can I tell whether an SEO tactic breaks spam rules?

Choose a permanent URL before deciding what to include in the sitemap

The relevant Webmasters Stack Exchange discussions recommend listing only the preferred permanent URL for a piece of content, rather than every alternative URL that can display it.

  • For example, if the same article is accessible at /posts/123 and /posts/123/article-title, article-title is the slug. First decide which URL is the canonical version.
  • If you choose the version without a slug, list that URL in the sitemap; if you choose the version with a slug, list that one. Do not include the alternative simply because it also works.
  • Another discussion recommends using full URLs, rather than paths alone, in both the sitemap and rel=”canonical”.

Keeping alternative URLs and retiring old URLs require different approaches

A Semrush article dated 2020 distinguishes between two scenarios: when duplicate URLs need to remain available, rel=”canonical” can indicate the preferred version; when an old URL is to be retired, a redirect can be used. The article explains that a sitemap can support other canonicalization signals but cannot establish the canonical URL on its own.

Another article dated 2020 recommends removing redirecting URLs from the XML sitemap and adding their new destination URLs where necessary. Following this advice, if the short URL in the example above redirects to the version with a slug, the sitemap should list the final chosen version, not the old URL. These are recommendations from historical articles and should not be treated as current platform rules verified for this article.

Do not use priority as a substitute for choosing a canonical URL

“Include all URLs and use priority to distinguish their relative weight” is the questioner’s understanding in one discussion, not an established practice. The relevant replies recommend leaving out alternative URLs rather than ranking different URLs for the same page.

As for whether the canonical URL should include a slug, one respondent prefers that version, considering it more search-engine-friendly. But this is advice from a discussion: the supplied material neither quantifies the benefits nor demonstrates that omitting a slug causes crawling problems. A slug therefore cannot be presented as a requirement. The key is still to choose one version and use the same canonical URL in the sitemap and rel=”canonical”.

ProcrustesPRProcrustesPRShould I rewrite or update an old article that does not rank?

Alternative URLs in sitemaps: perspectives from across the web

Are URLs without slugs necessarily less crawler-friendly?

The supplied material does not establish that URLs without slugs are less crawler-friendly. One respondent recommends a canonical URL with a slug, considering it more search-engine-friendly, but provides no comparison of how the two URL formats are crawled or figures quantifying any benefits. This is advice from a discussion, not a proven advantage. If you have already chosen a permanent URL without a slug, focus on keeping the sitemap consistent with your canonicalization settings rather than assuming that the URL will cause crawling problems.

How should the sitemap be updated after an old URL is redirected?

If you have decided to retire an old URL and redirect it, the supplied 2020 article recommends removing that URL from the XML sitemap and adding the new destination URL where necessary. If an alternative URL needs to remain available rather than be retired, another article recommends using rel="canonical" to indicate the preferred version. A sitemap can support this signal, but it cannot establish the canonical URL on its own.

Can both URL versions be listed and distinguished using priority?

The supplied discussions do not recommend this approach. Instead, they recommend listing only the preferred permanent URL for the content, without adding alternative versions. Listing both URLs and distinguishing them using priority is the questioner's understanding, not an established approach. A 2021 article also states that Google ignores priority values, but this is a claim from a historical article and should not be treated as a verified current platform rule.

ProcrustesPRWill Reposting Social Content on My Website Cause a Duplicate-Content Penalty?

References

  1. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Source used in the article above.
  2. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Discusses: Can both URL versions be listed and distinguished using priority?
  3. Canonical URLs: SEO Best Practices, Common Issues, and How to Fix Themwww.semrush.com · 2020-05-15T17:19:00Z — Discusses: How should the sitemap be updated after an old URL is redirected?
  4. 301 Redirects: How to Use Them & How They Affect SEOwww.semrush.com · 2020-05-08T15:32:00Z — Discusses: How should the sitemap be updated after an old URL is redirected?
  5. How to Submit a Sitemap to Google (in 3 Simple Steps)www.semrush.com · 2021-06-16T21:05:00Z — Discusses: Can both URL versions be listed and distinguished using priority?
  6. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Discusses: Are URLs without slugs necessarily less crawler-friendly?; Can both URL versions be listed and distinguished using priority?
  7. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Discusses: Are URLs without slugs necessarily less crawler-friendly?; Can both URL versions be listed and distinguished using priority?
  8. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Source used in the article above.
  9. Should URLs in the sitemap contain the slug?webmasters.stackexchange.com — Discusses: Are URLs without slugs necessarily less crawler-friendly?

Related articles

How can I tell whether an SEO tactic breaks spam rules?Should I rewrite or update an old article that does not rank?Will Reposting Social Content on My Website Cause a Duplicate-Content Penalty?What types of URLs are there, and what are they used for?What are the common mistakes, limitations, and costs of using subdomains?Can two URLs point to the same website?How to improve on-site content and structure: audit pages first, then address content gaps and internal linksHow can you use multiple domains to build content and traffic while assessing the risks?
ProcrustesPR
ProcrustesPR