We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Include option: disable sitemap.xsl?

  • #7013
    Avatar photo[anonymous]

    I’ve been using Publii for a few weeks for a private small blog and I’m very excited about it.
    My question is if there is a way built into Publii to de-activate the xsl for the sitemap layout?

    I normally use my domain without www – however Publii creates the sitemap.xml with an xsl entry on the notation of how the domain was created in Publii.

    <?xml-stylesheet type="text/xsl" href=""?>

    If there the domain was created with www, there is the xsl entry for wwww in the sitemap.xml.

    If then no (usable) redirection was set up on the webserver, then e.g. google complains that no sitemap.xml can be found.

    I could solve the problem on my Apache server with an appropriate .htaccess.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^
    RewriteRule (.*)$1 [R=301,L]

    (marolu can only be reached via ipv6)

    However, I think that there are server environments where it is not possible for a website admin to set a rewrite rule
    or a .htaccess – or some people don’t care about a nice sitemap.xml.

    Wouldn’t it be a good option to be able to disable the xsl?
    Can you check this?

    Translated with (free version)

    Avatar photo[anonymous]


    I do not think it is an issue – if you have such problem, you have a problem with your server configuration not with sitemap. You should always handle www.* prefix properly if it is not used.