---
schema_version: "1"
id: 0ad417b1daaff32e4dc9798d30ff7fb2272798400a890605c318a03c062e7652
title: Change the Domain Name for a Custom Domain
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/domain_mgmt_change_name.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_change_name.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e62bb3a0709d295711cbc061f7448e7457b4160757defd85110c9c8cf71e9d24
description: Whether your brand changed or you want to use a different domain to serve your site content, you can change the domain name of an existing custom domain in Salesforce. Review these important steps to ensure a smooth transition and reduce the risk of takeover attacks.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Change the Domain Name for a Custom Domain

Whether your brand changed or you want to use a different domain to serve your site content, you can change the domain name of an existing custom domain in Salesforce. Review these important steps to ensure a smooth transition and reduce the risk of takeover attacks.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Applies to: Salesforce Sites and <a href="https://help.salesforce.com/s/articleView?id=experience.exp_cloud_basics_glossary.htm&amp;language=en_US" target="_blank">LWR, Aura, and Visualforce sites</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d98830e78">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">To view a domain:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">
              <p>Manage Custom Domains</p>
              <p>OR</p>
              <p style="margin-bottom:0;">View Setup and Configuration</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">To add a domain:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">
              <p>Manage Custom Domains</p>
              <p>OR</p>
              <p style="margin-bottom:0;">View Setup and Configuration plus either a Site.com Publisher license or Create and Set
                Up Experiences</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">To edit or delete a domain:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d98830e78 ">Manage Custom Domains</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note

These instructions apply when an existing custom domain serves your site content and you want to switch to serving the site content on a different domain name.

To serve your site content on an additional domain, add the domain in Salesforce. More than one domain can serve the same site content. For an example where three custom domains serve one parent site with two different brands, see [Custom Domain Build Example](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_build_example.htm&release=264.0.0&type=5 "Domains and sites can have a many-to-many relationship through custom URLs. See this relationship in action with an example where three custom domains serve one parent site with two different brands.").

To minimize the downtime for your site, consider setting up and activating your new domain in Salesforce, and then [delete](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_delete.htm&release=264.0.0&type=5 "To stop serving a site via your custom domain, such as https://www.example.com, first delete the custom URLs for that domain. Then delete the domain in Salesforce. Or to point the domain to a different site, set up new custom URLs.") the old domain.

To update an existing custom domain to serve your site content on a different domain name and stop using the current domain, complete these steps.

Before you start, determine how to process visits to your old domain after the change. Common approaches include redirecting traffic to your new domain or displaying a landing page that directs visitors to the new page.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_tip.png)

Tip To minimize site downtime, update the domain in Salesforce and the DNS records when your org receives minimal traffic, such as during the weekend.

1. Complete the prerequisites for your chosen domain configuration option to serve the domain.
    1. To serve your domain with your HTTPS certificate on Salesforce servers, complete the [prerequisites](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_cert_prereqs.htm&release=264.0.0&type=5 "Before you serve your domain with an HTTPS certificate that you own, confirm that this domain configuration option applies to your configuration. Then update your DNS configuration, and upload your HTTPS certificate.") for that option
    2. To serve your Digital Experiences with the Salesforce content delivery network (CDN), complete the [prerequisites](https://help.salesforce.com/s/articleView?id=platform.community_builder_cdn_prerequisites.htm&release=264.0.0&type=5 "Before you set up a custom domain that uses the Salesforce content delivery network (CDN), complete these steps.") for the Salesforce CDN.
    3. To use a third-party service or CDN to serve your domain, complete the [prerequisites](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_enable_https.htm&release=264.0.0&type=5 "If a non-Salesforce service or content delivery network (CDN) serves your domain, complete these steps before you add your domain in Salesforce. To confirm your domain ownership, update your domain’s Domain Name Service (DNS) configuration. Then work with the third-party provider to ensure access to the required HTTP protocols, configure caching and request handling, and review reverse proxy restrictions. If you’re using a third-party CDN, update the header in your CDN to track IP addresses.") for that option. These third-party services include third-party hosts, web application firewalls (WAFs), and non-Salesforce CDNs.
2. Reduce the Time to Live (TTL) of your domain in DNS. Use a small value, such as 300, for 300 seconds or 5 minutes.
    
    Work with your DNS provider to complete this step.
    
    Think of your TTL as a timer for calls to your domain. This value tells servers how long to cache, or keep, a web page before calling DNS again to refresh the page. When you temporarily reduce this value, you minimize the chance of your users calling the previous IP address during the move.
    
    After you make this change, wait for the time duration of the previous TTL before you make other changes to DNS.
3. If a third-party service or CDN serves your new domain, work with your third-party provider to [use your target host name](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_enable_https.htm&release=264.0.0&type=5 "If a non-Salesforce service or content delivery network (CDN) serves your domain, complete these steps before you add your domain in Salesforce. To confirm your domain ownership, update your domain’s Domain Name Service (DNS) configuration. Then work with the third-party provider to ensure access to the required HTTP protocols, configure caching and request handling, and review reverse proxy restrictions. If you’re using a third-party CDN, update the header in your CDN to track IP addresses.") to forward requests to your domain to your org.
4. If you plan to serve your new domain with your HTTPS certificate on Salesforce servers on with the Salesforce CDN, [point the new domain to your org](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_update_dns.htm&release=264.0.0&type=5 "Before you add a domain in Salesforce, point your domain to your Salesforce org in Domain Name Service (DNS). If your custom domain uses your HTTPS Certificate or the Salesforce content delivery network (CDN) partner, add a canonical domain name (CNAME) record for your fully qualified domain (FQDN) to DNS. The CNAME record references your Salesforce org ID and your FQDN. Then, if you plan to use the Salesforce CDN to serve your Experience Cloud site on your custom domain, add a second CNAME record that our CDN partner requires.").
5. From Setup in production, in the Quick Find box, enter Domains, and then select **Domains**.
6. For the domain with your old domain name, click **Edit**.
7. Clear the Domain Name field, and then enter your new domain name.
    
    Salesforce validates ownership based on the fully qualified domain name (FQDN) that you enter when you add a domain to your org. If you get an error message, [point your custom domain to your org](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_update_dns.htm&release=264.0.0&type=5 "Before you add a domain in Salesforce, point your domain to your Salesforce org in Domain Name Service (DNS). If your custom domain uses your HTTPS Certificate or the Salesforce content delivery network (CDN) partner, add a canonical domain name (CNAME) record for your fully qualified domain (FQDN) to DNS. The CNAME record references your Salesforce org ID and your FQDN. Then, if you plan to use the Salesforce CDN to serve your Experience Cloud site on your custom domain, add a second CNAME record that our CDN partner requires."), and then wait for the changes to propagate. After you update your domain’s DNS record, it can take up to 72 hours for that change to take effect worldwide.
8. If you serve your domain with your HTTPS certificate, update the certificate.
    1. Under the domain configuration option, Serve the domain with your HTTPS certificate on Salesforce servers, clear the certificate field. Then click the lookup icon (![The lookup icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/lookup_icon.png)).
        
        ![Domain edit screen with the certificate field circled.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/domain_edit_cert.png)
    2. In the lookup window, select the label of the certificate for your new domain.
9. If you use a third-party service or CDN to serve your domain, update the external host name.
    
    This step is required to serve your new domain. If you no longer have control over the DNS or service of the previous external host name, this action also reduces the risk of a domain takeover attack.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note
    
    Without these steps, an attacker can potentially take over the custom domain’s live service.
    
    For example, a third-party CDN serves your custom domain and the corresponding external host name for the domain is cdn.example.com. You remove your custom domain from that CDN, and the domain record in Salesforce isn’t updated to remove the pointer from www.example.com to cdn.example.com. In this situation, an attacker can potentially create an account with that CDN and then set up your custom domain in that CDN to serve content that’s under their control.
10. Save your domain.
    
    After you save your custom domain, Salesforce provisions the domain or gets it ready to be used. The provisioning process can take 4–14 hours. During provisioning, your site can be inaccessible.
    
    When that process is complete, the domain’s status on the Domains Setup page changes to Awaiting Activation and you receive an email.
    
    Until you activate the domain, the configuration uses your previous domain name.
11. To activate your domain, on the Domains Setup page, click **Activate** next to your custom domain name.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)
    
    Note Custom domains for a sandbox are edited and activated in production.
    
    Your site can be unavailable for 5–10 minutes, so activate your custom domain when your site traffic is low. When your site is active, the status changes from Awaiting Activation to Completed.
12. In DNS, remove the records that point to your Salesforce org from your old domain. Work with your DNS provider to complete this step.
    
    1. If you use a registrable domain, work with your DNS provider to remove the alias record or canonical name (CNAME) flattening setting that points to your Salesforce org.
    2. If you serve your domain with your HTTPS certificate, remove the CNAME record for your old domain that points to your internal Salesforce CNAME.
    3. If you serve the Salesforce CDN, remove the CNAME record for your old domain that points to your internal Salesforce CNAME. Also remove the acme-challenge CNAME for your old domain.
    4. If a third-party service or CDN serves your domain, work with that third party to remove the target host name that points to your Salesforce org.
    
    For more information on these settings, see [Point Your Custom Domain to Your Salesforce Org](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_update_dns.htm&release=264.0.0&type=5 "Before you add a domain in Salesforce, point your domain to your Salesforce org in Domain Name Service (DNS). If your custom domain uses your HTTPS Certificate or the Salesforce content delivery network (CDN) partner, add a canonical domain name (CNAME) record for your fully qualified domain (FQDN) to DNS. The CNAME record references your Salesforce org ID and your FQDN. Then, if you plan to use the Salesforce CDN to serve your Experience Cloud site on your custom domain, add a second CNAME record that our CDN partner requires.") and [Prerequisites for a Custom Domain That Uses a Third-Party Service or CDN](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_enable_https.htm&release=264.0.0&type=5 "If a non-Salesforce service or content delivery network (CDN) serves your domain, complete these steps before you add your domain in Salesforce. To confirm your domain ownership, update your domain’s Domain Name Service (DNS) configuration. Then work with the third-party provider to ensure access to the required HTTP protocols, configure caching and request handling, and review reverse proxy restrictions. If you’re using a third-party CDN, update the header in your CDN to track IP addresses.").
13. Update your old domain to redirect or inform users.
    
    Update DNS or work with your third party to establish a redirection to your new domain, or to display a page informing visitors about the new domain.

If you still have control over the old domain, you can reset the TTL in DNS after your users transition to the new site. You can also remove redirections or the informational page about the move when that redirection is no longer required.

#### See Also

- [Custom Domains](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt.htm&release=264.0.0&type=5 "Provide a branded experience for users who access your external-facing Salesforce content by serving your Digital Experiences or Salesforce Sites on a domain that you own, such as https://www.example.com.")
- [Custom Domain Management](https://help.salesforce.com/s/articleView?id=platform.domain_mgmt_dom_detail.htm&release=264.0.0&type=5 "Keep your custom domain up to date with your business needs. Learn how to manage your domain during org migrations and certificate changes. Edit your domain’s configuration option, move to a different domain name, or enable HSTS preloading. And when you no longer need a custom domain, delete the domain and its custom URLs in Salesforce.")