AEM Dispatcher: Navigation URLs redirect to English site due to rewrite rule changes

This article explains how to resolve an issue in Adobe Experience Manager (AEM) where navigation links on localized sites incorrectly redirect users to the English site due to dispatcher configuration or rewrite rule changes.

Description description

Environment

Adobe Experience Manager (AEM), all versions, using Dispatcher for URL rewriting and caching.

Symptoms

  • Navigation links on localized sites (such as Chinese or Japanese) redirect users to the English version (For example: /en) instead of the intended localized page.
  • All URLs in the global navigation are appended with /en, regardless of the user’s locale.
  • The issue is present in the target environment but not in a reference environment where navigation works as expected.
  • No error messages are displayed, but navigation doesn’t route to the correct localized content.

Cause

A recent change to the dispatcher configuration introduced a rewrite rule or mapping discrepancy, causing all navigation links to default to the English site (/en) instead of respecting the intended locale. This often results from missing or altered language-specific rewrite rules in dispatcher configuration files.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review recent dispatcher configuration changes:

    • Compare the dispatcher configuration files (such as dispatcher_vhost.conf and rewrite.rules) between the affected environment and a known-good reference environment.

    • Focus on rules that handle language code routing and URL mapping for different locales (For example: /jp, /cn, /en).

  2. Restore or correct dispatcher rewrite rules:

    • Identify any missing or altered rewrite rules responsible for locale-specific routing.

    • Ensure the configuration doesn’t default all navigation to /en.

  3. Validate resource resolver and vanity URL mappings:

    • On the publish instance, confirm that resource resolver mappings and vanity URL configurations exist for all supported locales.
  4. Apply configuration updates to the target environment:

    • Deploy the corrected dispatcher configuration.

    • Take backups of current configuration files before making changes.

  5. Clear dispatcher and CDN caches:

    • After updating the configuration, clear the dispatcher cache and any CDN caches to ensure changes are reflected immediately.
  6. Verify navigation behavior:

    • Test navigation on all affected localized sites to confirm that URLs route to the correct localized pages and no longer default to /en.
recommendation-more-help
experience-cloud-kcs-help-kbarticles