As a fun project I've written my own URL shortening service. I'd like to know if it makes sense / be useful to include the shortened URLs in the generated XML sitemap. At the moment I'm leaning towards not including them but I need other, more knowledgeable people's opinion.

2 Answers 2


No, the shortened URL should not go in the XML sitemap.

The shortened URL presumably redirects to the long (canonical) URL. Only the canonical URL should appear in the XML sitemap. If the canonical URL is an external resource then that wouldn't be in the XML sitemap either. (The XML sitemap identifies resources on your own site that you want to be considered for indexing.)

  • All the assumptions are correct. The canonical URLs are external. Thank you! Commented Mar 18, 2015 at 15:16

Agreed except in the probably unlikely event you want to make a custom short url the one that you want the search engines to place higher priority on.

To do this you:

  1. make a copy of the page and name it with the shortened name.
  2. emove any canonical code from the original and make the new copy canonical

Short is better and now you've made it canonical. Piece of cake.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.