Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More

Multiple Custom Domains Mapped to the Same Experience Cloud Site with Auth Provider

Publish Date: Jun 23, 2026
Description

When multiple custom domains are mapped to the same Experience Cloud site, users who log in through an Authentication Provider (Auth Provider) will always be redirected to the site's primary domain URL after a successful authentication — regardless of which custom domain they used to initiate the login.

Example: If both example.com and example.cn are mapped to the same Experience Cloud site, and example.cn is set as the primary domain, a user who starts login from example.com will be redirected to example.cn after authenticating.

Note: The primary domain is the URL displayed for the site in the All Sites section in Setup.

This is expected behavior and not a product defect.

Steps to Reproduce
  1. Create two custom domains:
  2. Map both domains to the same Experience Cloud site.
  3. Configure an Authentication Provider (such as Azure AD or Google).
  4. Review the site's Custom URLs list and observe that example.cn appears before example.com because of alphabetical ordering.
  5. Access the site using example.com.
  6. Authenticate through the Auth Provider.
  7. Observe that the user is redirected to example.cn after successful authentication.

 

Root Cause
This is expected platform behavior.


When multiple custom domains are associated with the same Experience Cloud site, Salesforce determines the effective URL based on the site's custom URL configuration. If a Primary URL is not explicitly selected, Salesforce uses the first HTTPS custom URL in alphabetical order.


During the authentication process, users can be redirected to this effective or primary URL, even if they initially accessed the site through a different custom domain.

Resolution
 

 

Knowledge Article Number

005387489

 
Loading
Salesforce Help | Article