I have an issue with the SXA sitemap where its rendering urls don't have an item in the site.

When going the sitemap through {siteurl}/sitemap.xml it is containing records such as the below. enter image description here

Looking in the content area part of sitecore we cannot find an item that relates to the url.

I was wondering if there is any way to debug or search for these random urls so I can remove them from the sitemap.

I'm using sitecore 9.0.


2 Answers 2


Sounds like Java Server Pages. Sitecore is based on .Net and doesn't use this page extension. That is why I assume that it could be added by some external sitemap(it is a built-in feature of SXA).

I suggest you check external sitemap settings for your SXA website:

  1. Open Settings item under your root SXA website
  2. Look for "Search Engine Sitemap" settings
  3. Check if you have any External Sitemaps

If you take a look at the current implementation of the SitemapGenerator service in Sitecore.XA.Feature.SiteMetadata.dll, there is a method GetFullUrl which renders the url in the sitemap

    protected virtual string GetFullLink(Item item, SitemapLinkOptions options)
      string itemUrl = LinkManager.GetItemUrl(item, options.UrlOptions);
      return options.Scheme + Uri.SchemeDelimiter + options.TargetHostname + itemUrl;

You can implement your own sitemap generator which will inherit from SXA SitemapGenerator service and override just the GetFullUrl method.

You should also verify if this isn't an issue in your current SXA version because in the latest version of SXA the method is implemented like this:

    protected virtual string GetFullLink(Item item, SitemapLinkOptions options)
      string uriString = LinkManager.GetItemUrl(item, options.UrlOptions);
      if (!uriString.StartsWith("/", StringComparison.Ordinal))
        uriString = new Uri(uriString).LocalPath;
      return options.Scheme + Uri.SchemeDelimiter + options.TargetHostname + uriString;

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.