Expand my Community achievements bar.

Introducing Adobe LLM Optimizer: Own your brand’s presence in AI-Powered search and discovery
SOLVED

Sitemap not rendering XML output

Avatar

Level 2

I'm using the out-of-the-box (OOTB) sitemap feature in AEM as a Cloud Service, but the /sitemap.xml endpoint isn't returning the expected XML format. Instead, it either shows an empty page or doesn't render at all.

I've confirmed that the Sitemap Generator is enabled and properly configured. The required OSGi services are active, and the pages are published. Still, the sitemap doesn’t generate or return the XML as expected.

Has anyone faced this issue or is there a specific configuration or step I'm missing to get the OOTB sitemap working?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @AadhiraRa,

Can you confirm if dispatcher blocking sitemap requests. By default, Dispatcher might not allow requests with selectors like sitemap or sitemap-index and an .xml extension.

You need to explicitly allow sitemap paths in your Dispatcher filter rules.

Add the following rule to your filter.rules:

# Allow AEM WCM Core Components sitemaps
/0200 { /type "allow" /path "/content/*" /selectors '(sitemap-index|sitemap)' /extension "xml" }

This rule allows requests like /content/your-site/sitemap.xml and /content/your-site/sitemap-index.xml to pass through the Dispatcher.

Please check this helpful thread where similar issue has been discussed: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/404-error-while-accessing-...

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @AadhiraRa,

Can you confirm if dispatcher blocking sitemap requests. By default, Dispatcher might not allow requests with selectors like sitemap or sitemap-index and an .xml extension.

You need to explicitly allow sitemap paths in your Dispatcher filter rules.

Add the following rule to your filter.rules:

# Allow AEM WCM Core Components sitemaps
/0200 { /type "allow" /path "/content/*" /selectors '(sitemap-index|sitemap)' /extension "xml" }

This rule allows requests like /content/your-site/sitemap.xml and /content/your-site/sitemap-index.xml to pass through the Dispatcher.

Please check this helpful thread where similar issue has been discussed: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/404-error-while-accessing-...

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Community Advisor

Hi @AadhiraRa ,

Try below steps:

 

1. Enable Sitemap at the Right Page Level

Make sure the Sitemap Generator is enabled on the root page of your site.

  - Go to AEM > Sites

  - Select your root page (e.g., /content/mysite)

  - Properties -> Advanced

  - Check “Generate Sitemap” (and Sitemap Root if it’s the main entry point)

  - Save & Publish the page

 

2. Dispatcher Filter Rule to Allow Sitemap

  -  Open your filter.rules file and add:

# Allow sitemap.xml and sitemap-index.xml
/0200 { 
  /type "allow" 
  /path "/content/*" 
  /selectors '(sitemap|sitemap-index)' 
  /extension "xml" 
}

This rule ensures requests like /content/mysite/sitemap.xml and /sitemap-index.xml are allowed.

After updating, flush dispatcher cache and restart dispatcher if needed.

3. Check OSGi Configuration

Ensure the OSGi service com.adobe.cq.wcm.core.extensions.sitemap.internal.SitemapServiceImpl is active and not overridden.

Check via:

/system/console/components

4. Sitemap Accessible at Proper Path

Try:

https://author.yoursite.com/content/mysite.sitemap.xml
https://publish.yoursite.com/content/mysite.sitemap.xml

And if root-mapped:

https://www.yoursite.com/sitemap.xml

If it 404s:

Try accessing with .html first to verify page exists

Check if sitemap servlet is being invoked (use logs or dev tools)

 

5. Logs for Debugging

Enable debug logging for the sitemap service:

Go to /system/console/slinglog and add:

Log Level: DEBUG

Watch logs when accessing /sitemap.xml

 

Regards,

Amit

Avatar

Community Advisor and Adobe Champion

Hi,

 

There are several things you should check, as the information you provided doesn't make it clear whether you've already reviewed these:

  • When you mention that it’s empty, do you mean it's empty at the Dispatcher level or on the Publisher? If it works on the Publisher but not on the Dispatcher, then your rewrite rules or filters in the Dispatcher may be incorrect.

  • First, verify that the content pages intended to generate the sitemap have the sitemapRoot property set.

  • Ensure that the scheduler is properly configured. Alternatively, you can enable on-demand mode to confirm that everything renders correctly and that the issue isn’t due to an incorrect scheduler pattern setup.

  • If you're using the scheduler, check under /var/sitemap to see whether the sitemap is being correctly generated. You can validate this on a local Publish instance.

If you go through the steps above, it should work as expected.

 

Hope this helps



Esteban Bustamante