Handle thousands of redirects | Community
Skip to main content
Level 1
February 9, 2026
Question

Handle thousands of redirects

  • February 9, 2026
  • 7 replies
  • 42 views

Hi All.

Is there a risk in having more than 5k+ redirects managed by the Dispatcher? Is there any recommendation from Adobe to manage this specific scenario?

Thanks.

7 replies

Vishal_Anand
Level 5
February 9, 2026

@DanielJi6  Yes - managing 5k+ redirects in the Dispatcher can cause performance, maintainability and operational risks. Adobe and web‑server best practices recommend offloading or using lookup‑style maps rather than many regex rules.

 

Risks

  • Performance: large rule sets slow request processing (CPU/latency) and increase memory use.
  • Reload cost: updating rules may require service reloads causing brief impact.
  • Complexity: hard to maintain, higher chance of mistakes and missed redirects.
  • Cache inefficiency: dispatcher cache hits/misses can be affected if redirects are not handled at edge.

Practical recommendations -

  • Edge/CDN redirects (preferred): implement redirects at CDN (CloudFront, Akamai, Fastly) — lowest latency and offloads origin.
  • Web‑server lookup maps: use webserver RewriteMap (Apache) or equivalent (IIS rewrite provider) — single fast lookup file instead of many rules.
  • Dispatcher config with lookup: if you must keep it on origin, serve a single lookup (map) and avoid thousands of regex entries.
  • Avoid per‑request complex regex: don’t use many RedirectMatch/mod_rewrite rules — they’re slow at scale.
  • AEM alternatives: Sling ResourceResolver mappings or a small lookup servlet can work but typically are less performant than CDN or webserver maps.

Quick checklist before implementation:

  • Can redirects be moved to CDN? (best fix)
  • Can you convert rules into a single lookup map?
  • Performance test with realistic traffic and measure latency/CPU.
  • Plan incremental rollout and monitoring/alerts.
DanielJi6Author
Level 1
February 9, 2026

Thanks.

 

Is there an example for lookup maps for AEMaaCS?


Can this configuration be done in Fastly for AEMaaCS?

Vishal_Anand
Level 5
February 9, 2026

@DanielJi6 Yes — use Fastly Edge Dictionaries + a small VCL snippet to implement thousands of redirects at the CDN edge. That’s the recommended approach for AEMaaCS (fast, low‑latency, offloads origin).

 

You’ll likely need to coordinate with Adobe Cloud/DevOps because AEMaaCS Fastly config is centrally managed; if you don’t have direct Fastly access, raise a Cloud Manager/Support request.

 

What you’ll build

  • An Edge Dictionary that stores old-path -> new-URL key/value pairs (one row per redirect).
  • A Request-phase VCL snippet that looks up req.url.path in the dictionary and issues a 301/302 when a match is found.
  • Optionally: prefix/wildcard handling, fallback logic, and caching/monitoring.
Shashi_Mulugu
Community Advisor
Community Advisor
February 9, 2026

@DanielJi6 yes dispatcher may not be best bet for large scale redirects.

 

Best place to add redirects are

1. CDN - in cloud its Fastly or if you have your own CDN.

2. Add a reverse proxy like Nginx which is very performant in handling redirects.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 11, 2026
BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 12, 2026

Hello ​@DanielJi6 ,

For a website migration where you need to retain SEO and user experience, 5,000+ redirects is not unusual. The key is how they are implemented.

There is risk if you configure thousands of individual rewrite rules directly in Dispatcher. This can slow down request processing and make the configuration difficult to maintain. It also increases the chance of mistakes during deployments.
 

Adobe does not define a hard limit, but the recommendation is to use a scalable approach. For migration use cases, you should:

  • Use 301 permanent redirects to preserve SEO value
  • Avoid thousands of inline rewrite rules
  • Use a RewriteMap file in Apache or handle redirects at the CDN layer

A RewriteMap is much more efficient than individual rules and is commonly used for large migration redirect lists.
 

If you manage redirects at the Dispatcher level, use a RewriteMap configuration like this:
 

RewriteEngine On
RewriteMap redirects txt:/etc/httpd/conf.d/redirects.map

RewriteCond ${redirects:$1} !=""
RewriteRule ^(.*)$ ${redirects:$1} [R=301,L]


Then add cache headers so the CDN can cache the redirect response:
 

<IfModule mod_headers.c>
Header always set Cache-Control "max-age=86400, public" "expr=%{REQUEST_STATUS} == 301"
</IfModule>

With this setup, the CDN will cache the 301 response, reducing repeat hits to Dispatcher and improving performance.
 

In AEM as a Cloud Service, Adobe also provides guidance on implementing pipeline-free URL redirects, which allows you to manage redirects without requiring a full code deployment. You can review that approach here:

https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/administration/implementing-pipeline-free-url-redirects 


That method can be useful for ongoing redirect management, especially when business users need flexibility.


Finally, involve the SEO team during and after migration. They should monitor traffic to legacy URLs and identify which redirects are still being used. Over time, unused legacy links can be decommissioned to simplify the redirect list and keep the configuration clean.


Hope this helps.

 

kautuk_sahni
Community Manager
Community Manager
February 17, 2026

@DanielJi6 Following up to see if this has been resolved. If you’ve found the answer, whether through the suggestions here or through your own troubleshooting, feel free to post the solution so others can benefit. If any reply helped along the way, marking it as accepted ensures the most useful information is easy to find. Thanks for helping close the loop!

Kautuk Sahni
AmitVishwakarma
Community Advisor
Community Advisor
February 18, 2026

Hi ​@DanielJi6 ,
Yes, 5k+ individual dispatcher rules are risky (slower eval, harder maintenance, higher error chance). There is no hard numeric limit, but Adobe’s guidance is to avoid thousands of inline rewrite/redirect rules in dispatcher.https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/administration/url-redirection
Best practice for AEM as a Cloud Service:

Rule of thumb:

  • Small number of rules => dispatcher/CDN config is fine.
  • Thousands of rules => use maps + pipeline‑free/edge redirects, don’t pile individual RewriteRule/RedirectMatch entries.

Thanks,
Amit

chaudharynick
Level 4
February 19, 2026

Hi ​@DanielJi6 

This will cause the performance issues.

Try the following

  1. reduce the count of the rules by combining rules to match certain regex.
  2. Try to move the rules to CDN(AEM managed or third party) - they will handle the redirect better and faster
  3. if you need to use dispatcher then use RewriteMap as its faster