AEM URL shortening issues with extension removal and Sling mappings

URL shortening in AEM can fail when attempting to remove extensions, hide internal paths, or rewrite segments. To fix the issue, use supported rewrite mechanisms, validate mappings, and acknowledge platform constraints.

Description description

Environment

  • Adobe Experience ManagerĀ as a Cloud Service (AEMaaCS)
  • AEM Managed Services
  • AEM On-Premise (6.5 and earlier)

Issue/Symptoms

  • Short URLs do not resolve on Publish but work in local environments
  • .html extension is not removed on cloud deployments
  • URLs with # fragments are not mapped or rewritten
  • Rewriter pipelines apply to unintended content paths
  • Reserved paths such as /experiments cannot be modified
  • Duplicate model.json requests occur in SPA implementations

Root cause

URL shortening issues occur due to unsupported features in cloud environments, HTTP limitations with URL fragments, misconfigured Sling mappings, overlapping rewriter configurations, and required system paths that cannot be altered.

How to confirm

  • Compare behavior between local and Publish environments
  • Inspect browser network requests to verify URL resolution
  • Check for multiple model.json calls in SPA implementations
  • Review logs for mapping or rewrite rule execution

Resolution resolution

To fix the issue:

  1. Use Dispatcher or CDN rewrite rules (such as Apache mod_rewrite) to handle extension removal and URL shortening.
  2. Avoid attempting to map or rewrite URL fragments (#), as they are not processed server-side.
  3. Ensure rewriter pipelines have unique order values and distinct path scopes.
  4. Do not modify system-reserved paths such as /experiments, as they are required for specific product features.
  5. Update Sling mappings to ensure short URLs correctly resolve to internal content paths, especially for SPA implementations.
  6. For on-premise setups, configure server-level rewrite rules to support extension removal.
recommendation-more-help
experience-cloud-kcs-help-kbarticles