Fix EDS 404 errors caused by missing CDN path rewrites and incorrect origin selector configuration

Edge Delivery Services (EDS) requests can return HTTP 404 errors or route to an incorrect backend when the CDN configuration does not rewrite request paths correctly or when origin selector rules do not match the rewritten paths. As a result, requests reach the backend using an unexpected path and return a 404 Not Found response.

Update the CDN path rewrite rules, verify the origin selector configuration, and validate request routing to resolve the issue.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service
  • Edge Delivery Services (EDS)
  • Adobe Developer App Builder
  • AEM Managed Services

Issue/Symptoms

  • Requests to Edge Delivery Services return HTTP 404 responses.
  • Requests are routed to an incorrect backend.
  • CDN logs show that the original request path is forwarded without being rewritten.
  • The backend returns a 404 Not Found response.
  • The cache status indicates MISS for the affected requests.

Cause

The CDN configuration does not correctly rewrite request paths or align origin selector rules with the rewritten paths, causing requests to be routed to an incorrect backend.

Resolution resolution

Follow these steps to resolve the issue

  1. Verify that the requested content exists on the backend by using the expected path structure.

  2. Review the CDN configuration and confirm that requestTransformations rules are configured correctly.

  3. Update or add requestTransformation rules so incoming requests are rewritten to the expected backend path. Configure the Transformationto match the incoming request path and replace it with the path expected by the backend.

    code language-none
    requestTransformations:
      rules:
        - name: rewrite-path
          actions:
            - type: transform
              reqProperty: path
              op: replace
    
  4. Verify that the originSelectors configuration matches the rewritten path and routes requests to the correct backend.

  5. Deploy the updated cdn.yaml configuration.

  6. Test the affected URLs and confirm that requests are routed correctly and do not return HTTP 404 errors.

  7. Review the CDN logs to verify that rewritten paths are forwarded to the correct backend and that requests complete successfully.

recommendation-more-help
experience-cloud-kcs-help-kbarticles