Configurations

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 https://wknd.com can be defined under /etc/map/https as follows:

PathProperty nameProperty typeProperty value
/etc/map/https/wknd-sitejcr:primaryTypeStringnt:unstructured
/etc/map/https/wknd-sitesling:internalRedirectString/content/wknd/(.*)
/etc/map/https/wknd-sitesling:matchStringwknd.com/$1

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

Sitemap absolute URLs configuration

Sitemap scheduler OSGi configuration

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

ui.config/src/main/jcr_content/apps/wknd/osgiconfig/config.publish

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

Dispatcher allow filter rule

Allow HTTP requests for the sitemap index and sitemap files.

dispatcher/src/conf.dispatcher.d/filters/filters.any

...

# 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.

dispatcher/src/conf.d/rewrites/rewrite.rules

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

More help on this topic

Previous pageComponents Console
Next pageUsing the SPA Editor

Experience Manager


The Perfect Blend: A New Era of Collaboration with AEM and Workfront

Adobe Customer Success Webinars

Wednesday, Apr 2, 5:00 PM UTC

Explore how Adobe Experience Manager and Workfront integrate to help teams move from ideation to delivery without the usual bottlenecks, ensuring content is organized, on-brand, and ready to go live faster.

Register

B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth

Online | Strategy Keynote | General Audience

B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...

Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)

Register

Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI

Online | Strategy Keynote | General Audience

Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...

Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more