Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to create XML Sitemap and Robots in AEM?


Level 4

Hi all,

I want to create XML Sitemap and Robots in AEM for SEO (Search Engine Optimize). How to do that? When I create a page it run as HTML not XML. How to auto generate an XML file as Create your Google Sitemap Online - XML Sitemaps Generator

Thank you so much,


5 Replies


Community Advisor


You need to do sling mapping, you have to make sitemap.xml to your page. and same for robot.txt

Sitemap creation – Java and AEM development | Flexible Designs d.o.o.

make sure you generate xml or txt output in page set content type as xml/txt based on file.



Level 3

Hello @arunpatidar 

can you suggest where the contentType("text/xml") be set?

I have 2 page page resource types, each has the "sling:resourceSuperType" set to "core/wcm/components/page/v2/page".

I am using the ACS Commons Sitemap Generator as per the instructions here, and


One of the .sitemap.xml requests return text/html and another returns text/xml. I did not do anything specific for either case.


Please see the complete question and error i have posted here:


Level 4

Thanks you for your help.

Please help me. How to configuration

  • Shown in sitemap
  • Change Frequency (for Sitemap)
  • Priority (for Sitemap)
  • Search Engine Index Allowed (Robots.txt)

How to config them in AEM. I am using AEM 6.2.

Thanks & Best regards,