Enhanced Domains: Logging Redirects to See Where People Are Coming From

If you change your My Domain hostname or enable My Domain, Salesforce automatically deploys “redirects” when users go to your old hostname. 

Example:
Let’s say your company is called ABC Pets and your “My Domain” hostname is https://ABCPets.lightning.force.com. XYZ Pets acquires your company and the “My Domain” hostname is changed to https://XYZPets.my.salesforce.com. People who bookmarked https://ABCPets.lightning.force.com will be redirected to https://XYZPets.my.salesforce.com.

“That’s great,” you think, “I don’t have to worry about bookmarks or anything if I change my domain name or turn on enhanced domains!”

The redirections are temporary though.

You do actually have to be concerned about what URLs users and integrations are using. The biggest concern is for enhanced domain hostname changes related to your Experiences and Sites since you can’t control external users' bookmarks.

To get a better sense of what old hostnames are being redirected, you can enable logging on My Domain Hostname Redirections. This allows you to see what old hostnames are out there and develop a communication strategy to encourage people to use the new URL.

How to Check My Domain Redirect Logs

Go to: Setup | My Domain | Routing | Edit

My-Domain-Routing

Use the API or the Download Redirections Log to check the redirect activities going on in your org. If you notice a negative pattern, take steps to develop a communication strategy to encourage adoption of the new URL.

You might also try turning off redirection in your sandbox where you are testing your enhanced domain. That will show you where failures in production could happen.

In the end, enhanced domains help enhance the security of your org and data. By taking advantage of this feature and following the simple steps above, you can easily manage your domains and make sure your customers and employees don’t miss a beat in the process.