AEM Dispatcher: Removing X-Vhost and X-Dispatcher headers from production responses

✨ This content is AI generated and could be inaccurate. Generative AI Terms

This article explains whether the X-Vhost and X-Dispatcher headers can be safely removed from production responses in Adobe Experience Manager environments, and provides guidance on how to do so.

Description description

Environment

  • Adobe Experience Manager (AEM) 6.5 LTS (all versions)

Symptoms

HTTP responses from the production website include the following headers:

  • x-vhost: <vhost-name>
  • x-dispatcher: <dispatcher-name>

These headers are visible in public responses. There are no error messages, and the headers are present for informational purposes only.

Steps to reproduce

  1. Access the production website.
  2. Inspect the HTTP response headers.

Cause

These headers are added for troubleshooting and informational purposes. They are not required by AEM at runtime and can be safely removed to reduce exposure of internal routing details.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review the Apache and Dispatcher vhost configuration files to identify where the X-Vhost and X-Dispatcher headers are set.
  2. Confirm that these headers are not required by AEM for publishing, replication, cache flushing, or caching operations.
  3. Remove or comment out the configuration lines that add these headers in the Apache vhost or Dispatcher configuration files. For example, remove Header set X-Vhost ... and Header set X-Dispatcher ... directives.
  4. Restart the Apache web server or Dispatcher service to apply the changes.
  5. Verify that the headers are no longer present in HTTP responses by accessing the production website and inspecting the response headers.
recommendation-more-help
experience-cloud-kcs-help-kbarticles