Understand Redirections for Previous My Domain Host Names
After you deploy a change to your My Domain, Salesforce redirects your previous My Domain host names. If your org was created before Summer ’22, enhanced domains were deployed in your org and some of those redirections were temporary. And if your production org or demo org was created before Summer ’20, host names that contained your Salesforce instance could be redirected. Learn more about these redirections and how to control them.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Group, Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
My Domain URL redirections help prevent disruption, but they’re not intended as a permanent solution. Not all services work well with redirections, and a redirection adds a step to the process of loading the final web page. When you deploy a new My Domain, we highly recommend that you disable redirections during testing and update all references to your old URLs.
Also, Salesforce stopped redirections for non-enhanced domains in Winter ’25 for Developer Edition orgs, patch orgs, scratch orgs, Trailhead Playgrounds, and existing sandboxes. Redirections for those domains stopped in all other orgs in Spring ’26.
To see if redirections are in place for a previous My Domain, check the Redirections section of the My Domain Setup page.
Redirection Rules
Redirections for your org’s previous host names follow different rules.
- For previous My Domain host names, Salesforce redirects your previous My Domain host names until you deploy another My Domain change or until you disable or remove your previous My Domain. All redirections from previous My Domain host names use redirect code 301 or redirect code 307.
- After enhanced domains were deployed, your previous
*.force.comsite host names were redirected until Spring ’26. - After enhanced domains were deployed, other previous non-enhanced host names were redirected until you deployed another change to your My Domain or until Spring ’26.
- If your org was created before Winter ’20, old bookmarks and links to your org can contain your Salesforce instance. Redirections for those URLs stopped in Spring ’26.
For all redirections, parameters passed via a URL follow these rules.
- The redirection includes query-string parameters up to the first hash (
#), if present. - The redirection doesn’t include any hash fragments. A hash fragment is the part of the
URL that includes a hash (
#) and the text that follows it. - For entity-containing requests, such as POST, the redirect includes a Temporary Redirect (307) HTTP response status code. That status code instructs the browser to retry the request at the new location via the original request method.
Limitations on My Domain Redirections
A redirection is an instruction sent to the requester of a URL, such as a browser, service, or search engine. During a call to one of your previous My Domain URLs, the Salesforce server responds with an HTTP status code and the new URL. The status code instructs the requester to use the new URL. The response also indicates that the previous My Domain URL is no longer valid so that the requester knows to update existing references to the previous URL.
When a user clicks a link to a previous My Domain URL, the browser is the requester, so the instructions are invisible to the user. Often, the user is unaware of the redirection unless you enable a message that notifies the user about the new URL.
However, there are some limitations on My Domain redirections. Here are the most common reasons why a call to a newly deployed My Domain URL isn’t redirected, even though Salesforce sent the redirection instruction.
- Lack of support for redirections—The requester can’t process the redirect instruction. In this case, to use the new URL, update the reference to the previous URL. Or work with the requester to get them to process the redirect request. Because of this limitation, My Domain redirections aren’t intended as a permanent solution.
- Lack of access to the URL—If the user or service can’t access the URL, the redirection fails. For example, if you restrict traffic on your network to specific domains and the new domain isn’t on the allowlist, the user can’t access the new URL. Also, IP restrictions can prevent users from accessing Salesforce features. Often the message that the user sees in these cases can help you determine the issue.
- A second My Domain deployment—When you deploy another My Domain change, existing redirections for your previous My Domain URLs stop. For more details on this situation, see the section in this topic on Previous My Domain Host Names. This situation is another reason that My Domain redirections aren’t intended as a permanent solution.
Previous My Domain Host Names
Each time that you deploy a change to your My Domain details, Salesforce redirects your previous My Domain host names to the host names for your current My Domain. For example, your My Domain login URL is example1.my.salesforce.com, and you change it to example2.my.salesforce.com. Requests to example1.my.salesforce.com are redirected to example2.my.salesforce.com, and requests to example1.lightning.force.com are redirected to example2.lightning.force.com. Also, other customers can’t use example1 as a My Domain name.
Before you deploy a My Domain change, consider the impact on any existing My Domain redirections. Salesforce only redirects your last set of previous My Domain URLs.
If you previously changed your My Domain, your previous My Domain host names redirect to your current My Domain URLs unless you disable those redirections. When you deploy another My Domain change, existing redirections stop, and Salesforce redirects the My Domains in place before the latest deployment instead.
Let’s look at some examples of how redirections are handled when you deploy a change to your My Domain and redirections are in place for previous My Domain host names.
In our first example, your old My Domain name is example1, and your current My Domain name is example2. You change your My Domain name a second time to example3. After you deploy this change, requests to
example2.my.salesforce.com domain are redirected to
example3.my.salesforce.com. Requests to
example1.my.salesforce.com are no longer redirected, and other
customers can use example1 as their My Domain name.
This rule applies to any My Domain change that requires My Domain provisioning and deployment, such as enabling enhanced domains or enabling partitioned domains.
In our second example, after you change your My Domain name to
example3 and deploy the change, you enable enhanced domains.
After you deploy the My Domain with enhanced domains, the non-enhanced host names for My Domain
example3 are redirected. For example, requests to
example3--c.visualforce.com are redirected to
example3--c.vf.force.com. However, requests to
example2.my.salesforce.com are no longer redirected, and other
customers can use example2 as their My Domain name.
To stop redirections of your old My Domain host names, disable redirections for your previous My Domain. If your previous and current My Domain names are different, you can make that My Domain name available for use in other orgs by removing your previous My Domain. For more information, see Disable or Remove Your Previous My Domain.
Track the Source of Redirections
When you deploy a change to your My Domain, external-facing URLs change. After you search the metadata for your org to determine where that URL is used in Salesforce, discovering all the other places that your URL is used can be more complex. For example, a site URL can be used on your website, Social media pages, marketing materials, and templates, such as email signatures and automated responses.
To help you identify these locations outside of Salesforce, the Hostname Redirects log includes the referrer and origin sent with each request that Salesforce redirects. For more information, see Log My Domain Host Name Redirections.
Host Names That Changed with Enhanced Domains
Enhanced domains meet the latest browser requirements. This feature was enforced in all Salesforce orgs in Winter ’24. With enhanced domains, all URLs across your org contain your company-specific My Domain name, including Experience Cloud sites and Salesforce Sites. The domain suffix also changed for multiple host names.
For a full list of the host names that changed, see My Domain URL Format Changes with Enhanced Domains Deployment. To understand the purpose of each host name type and whether it applies to you, see My Domain Host Names.
Temporary My Domain Redirections
To minimize potential disruption after enhanced domains were deployed, Salesforce redirected your prior non-enhanced host names to the new host names, along with all of your other previous My Domain host names. However, redirections for non-enhanced host names were temporary. In Winter ’25, Salesforce stopped redirections for legacy (non-enhanced) My Domain URLs in Developer Edition orgs, patch orgs, scratch orgs, Trailhead Playgrounds, and existing sandboxes. Redirections for those legacy URLs stopped in Spring ’26 in all other orgs, including production orgs.
If your org was created before October 2020, you didn’t get a My Domain by default. In that case, your users accessed Salesforce with host names that contained your instance name but not your My Domain name. Redirections for these host names also stopped in Winter ’25 for most non-production orgs and stopped in Spring ’26 for all orgs, including production orgs.
For details on the changes related to these redirections and your options in each release, see Enhanced Domains Timeline. For more information on the affected host names, see Prepare for the End of Redirections for Non-Enhanced Domains.
Instanced Login URLs
Salesforce orgs created before Winter ’20 didn’t have a My Domain name by default. In this case, users accessed Salesforce via host names that contain your Salesforce instance, such as na42.salesforce.com. Code and API calls also used these instanced URLs. Salesforce doesn’t recommend using that login URL. First, API calls to a Hyperforce org can’t use that method. Second, when your org is moved to another Salesforce instance, code and API calls that use the instanced URL break.
Although API traffic that uses your correct instanced URL continues to work after these changes, that API traffic stops working if your org’s instance changes. Your org’s instance name can change during regular maintenance, such as an instance refresh, or during a migration to the latest infrastructure, such as Hyperforce. For that reason, we recommend that you use your My Domain login URL in all API calls.
Most importantly, API traffic that uses an incorrect instanced URL stops working shortly after your org gets the Winter ’27 release. To test this change, enable Block API traffic that uses an incorrect instanced URL in the Redirections section of the My Domain page in Setup after June 18, 2026.
For more information, see End-of-Support Schedule for Incorrect Instanced URLs in API Traffic.
To require that users or SOAP API logins use your My Domain login URL, update your My Domain login policy.

