I wouldn't mind showing my XML sitemap to users if there were a way to make it human usable as opposed to just machine readable. Is it possible to:

  • Choose the colors and layout
  • Make the locations into links
  • Allow sorting based on the field (location, last modified, etc)

I was thinking that XSLT might be a possibility, but I haven't explored it. If it is possible, please provide a minimal example.

  • For a trivial/small site, the navigation should be enough to guide users to the content they need. For a larger site, a sitemap with all URLs will be overwhelming. Sure you can technically do that, but does it really make sense for your users? Apr 28, 2015 at 20:40
  • I've seen sitemaps show up in search results and I was thinking that making them usable might be a better solution than noindexing them. Apr 28, 2015 at 23:37
  • You can do a lot with XSLTs; we made some nice ones back in the day, and many sitemap generators include them by default (eg, johnmu.com/sitemap.xml ), but in the end I don't think they're really that useful to users, I'd just noindex them if they showed up in normal search for the site's keywords (that's probably a sign that something else is wrong with the normal pages anyway). Apr 30, 2015 at 18:38

2 Answers 2


Yes. Everything you ask for is possible. And here's an example XML sitemap file generated by the Drupal XML sitemap module with a little bit of configuration. Everything is done for you out of the box.


If you check the code of the XML file there's a link to an XSL and inside that file you can see the code with references to JS and CSS files and more or less similar to an HTML file.

The above you get almost free (with little config that is) with Drupal and its XML sitemap module. Now check this:


This is custom made code we wrote to automatically display all the pages (blog posts, portfolio items, etc) in a user friendly sitemap format. I'm not aware of an automated way to go about this as this tends to be site specific. In my opinion, this is more user friendly and also keeps the website's navigation and footer and everything.

Hope this helps and good luck.


Of course. XML is just XML and can be served as XHTML by using XSL if you wish and styled with CSS.

  • Do you have a minimal example of an XSLT stylesheet that will transform a sitemap? Apr 23, 2015 at 12:29
  • No but, years ago, I used to serve my personal web site from XML as XHTML as I described. XSLT is a different animal.
    – Rob
    Apr 23, 2015 at 12:29
  • I've used XSLT server side and I've seen it used client side to make RSS feeds pretty. I've never seen an example applied to a sitemap file, but the possibility intrigues me. Apr 23, 2015 at 12:30
  • @StephenOstermiller Without giving it any thought at all, the code should be the same.
    – Rob
    Apr 23, 2015 at 12:32
  • 1
    "XSLT is a different animal." - Isn't XSLT what is required here? XSL is just a group term encompassing these technologies. (?)
    – MrWhite
    Apr 24, 2015 at 8:37

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.