Sitemaps are the best way for search engine bots to index all your website pages correctly. They also organize the web pages into logical categories and help people easily navigate your website.
As part of its out-of-the-box (OOTB) solution, AEM uses the Apache Sling Sitemap module to generate XML sitemaps. You must explicitly enable sitemap generation in AEM to take advantage of this feature. The module is included in the AEM-as-a-Cloud-Service (AEMaaCs) Software Development Kit (SDK). To use the sitemap generator, you must also install SP11 (Support Pack 11) for AEM.
How to Implement Sitemap Generation
It's important to keep your site's XML sitemap up to date. The popular ACS Commons Sitemap Generator is now deprecated. Instead, we recommend using the AEM OOTB Sitemap generation module, which provides developers and editors with a wide range of options.
The AEMaaCs SDK is bundled with the OOTB Apache Sling Sitemap module. However, if your current AEM version is older than 6.5 service pack 11, a version upgrade is required to use the OOTB sitemap functionality.
Approaches for OOTB Sitemap Generation
To enable the sitemap for AEM Sites, you can use the Apache Sling Sitemap module in one of two ways: on-demand and background generation. Let's first look at on-demand generation.