۶Ƶ

AEM Cloud preview shows “It works!” instead of your site homepage

If your ۶Ƶ Experience Manager (AEM) publish or preview environment shows an It works! message instead of your site’s homepage, it means the server is routing requests to the default Apache page. This happens when the virtual host (vhost) configuration doesn’t include your domain. To fix it, you’ll need to update your vhost settings, test the changes, and optionally add a catch-all vhost and custom headers to help with future troubleshooting.

Description description

Environments

  • ۶Ƶ Experience Manager (AEM) as a Cloud Service – Sites
  • ۶Ƶ Experience Manager 6.5

Issue/Symptoms

This issue occurs when the vhost configuration for the domain is missing or incorrect. Symptoms include:

  • The publish or preview URL displays an It works! .
  • Requests are routed to Apache’s default landing page instead of your AEM site.

Resolution resolution

  1. Open your vhost file and add the preview or publish domain (for example, publish-pXXXXXX-eXXXXXX.adobeaemcloud.com) to the ServerAlias directive. Make sure the domain is mapped correctly so requests are routed to the AEM service.

  2. Deploy the updated vhost configuration and test it by accessing the preview URL. Confirm that it now loads your AEM site instead of the default Apache page.

  3. Add a wildcard ServerAlias * to a vhost file to act as a catch-all for unmatched requests. This helps improve security and reliability in Dispatcher setups.

  4. Add a custom response header in each vhost file to identify which vhost handled the request. This makes troubleshooting easier using browser dev tools or curl.

    code language-none
    <IfModule mod_headers.c>
      Header always add X-Vhost "myvhostname"
    </IfModule>
    
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f