How does AEMaaCS determine which preview domain to use when multiple are mapped to the same environment? | Community
Skip to main content
Level 2
May 6, 2025
Solved

How does AEMaaCS determine which preview domain to use when multiple are mapped to the same environment?

  • May 6, 2025
  • 1 reply
  • 499 views

In AEMaaCS, we have multiple preview domains configured in the Domain Mapping section of Cloud Manager. All of them are mapped to our Preview production environment, each associated with specific content paths.

 

However, when generating a Preview Link for a page (e.g., from the Page Editor), AEM seems to automatically pick one of the preview domains, and it's always the same one.

 

How does AEM determine which domain to use for preview link generation when multiple preview domains are mapped to the same environment?

Best answer by ShivamKumar

Hi @aa_w ,

In AEMaaCS, when multiple preview domains are mapped to the same Preview environment, AEM uses the first domain listed in the Cloud Manager Domain Mapping configuration as the default domain for generating preview links. This behavior is by design and ensures consistency in how preview links are constructed.

 

Reorder the domain entries in Cloud Manager’s Domain Mapping section so that the desired preview domain appears first for the Preview environment.

Thanks.

1 reply

ShivamKumarAccepted solution
Level 4
May 6, 2025

Hi @aa_w ,

In AEMaaCS, when multiple preview domains are mapped to the same Preview environment, AEM uses the first domain listed in the Cloud Manager Domain Mapping configuration as the default domain for generating preview links. This behavior is by design and ensures consistency in how preview links are constructed.

 

Reorder the domain entries in Cloud Manager’s Domain Mapping section so that the desired preview domain appears first for the Preview environment.

Thanks.

aa_wAuthor
Level 2
May 6, 2025

Good to know,

We've had the domain as the first preview domain at the top of the domains list for a while now but it hasn't changed yet. Does it require a pipeline rebuild?