Cautionary Notice
Please contact us if you have a legitimate use case for folder mapping, we will help to find the best solution. Existing projects using folder mapping may need to migrate to a different solution in the future.
Folder Mapping
Folder mapping lets a single page serve content for a whole range of URLs. While that sounds useful, it is only recommended in a narrow set of situations: authenticated sites, or single-page apps serving content that isn't meant to be indexed.
Outside of those cases, folder mapping creates an effectively infinite URL space that always serves a 200 HTTP status code. That's why it's feature-flagged to prevent accidental misuse. See Alternatives below.
Anti-Patterns
Avoid folder mapping for:
- Sites with SEO/GEO needs
- Sites using a combination of a large number of pages and frequently changing metadata. For such use cases, it is better to provide the content via different methods (see Alternatives)
- Mapping of excessively dynamic or infinite URLs like
/search/<query>. Dynamic search results are better served via query parameters or URL hash property - Generating non-cacheable content like user-specific URLs. This can lead to cache pollution and possible security risks if content is unintentionally cached.
Alternatives
Rendering a large or dynamic set of URLs from one template, such as a product catalog, is one of the most common reasons teams reach for folder mapping. If SEO or GEO matters for that content, folder mapping is rarely the right tool, but AEM offers real alternatives that generate individually addressable, crawlable pages instead:
- Bulk Metadata or page metadata: if your pages already exist or are generated another way, and what you actually need is per-URL metadata (title, description, JSON-LD) rather than full dynamic content, applying metadata in bulk is usually the simplest option
- A custom BYOM content source: build and host your own content generator (or CDN-level stitching layer) that returns real HTML for each URL from your own backend. This takes more effort but gives you the most control, and suits teams with existing content-generation infrastructure or edge-composition needs.
- JSON2HTML: a hosted worker that turns backend JSON into BYOM-friendly HTML using a Mustache template, with no service of your own to build or deploy. A good fit when your data is already available as JSON and you want something running quickly.
Not sure which fits your use case? Talk to your Adobe contact.
Folder-mapped Metadata
Metadata can be applied on the server-side to all folder-mapped pages. For example, if /templates/ is folder-mapped to /templates/default, metadata in /templates/default/metadata will be applied to all pages below /templates/ if the URL pattern matches.
See Bulk Metadata for expected format and supported properties.