Learn how to help boost your SEO by creating sitemaps for AEM Sites.



Sitemap scheduler OSGi configuration

Defines the OSGi factory configuration for the frequency (using cron expressions) sitemaps are re/generated and cached in AEM.


  "": "WKND Sitemaps",
  "scheduler.expression": "0 0 2 1/1 * ? *",
  "searchPath": "/content/wknd"

Absolute sitemap URLs

AEM’s sitemap supports absolute URL’s by using Sling mapping. This is done by creating mapping nodes on the AEM services generating sitemaps (typically the AEM Publish service).

An example Sling mapping node definition for can be defined under /etc/map/https as follows:

Path Property name Property type Property value
/etc/map/https/wknd-site jcr:primaryType String nt:unstructured
/etc/map/https/wknd-site sling:internalRedirect String /content/wknd/(.*)
/etc/map/https/wknd-site sling:match String$1

The screenshot below illustrates a similar configuration but for http://wknd.local (a local hostname mapping running on http).

Sitemap absolute URLs configuration

Dispatcher allow filter rule

Allow HTTP requests for the sitemap index and sitemap files.



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

Apache webserver rewrite rule

Ensure .xml sitemap HTTP requests are routed to the correct underlying AEM page. If URL shortening is not used, or Sling Mappings are used to achieve URL shortening, then this configuration is not needed.


RewriteCond %{REQUEST_URI} (.html|.jpe?g|.png|.svg|.xml)$
RewriteRule ^/(.*)$ /content/${CONTENT_FOLDER_NAME}/$1 [PT,L]

On this page