Custom Domain Prerequisites

Before you serve your site content with a custom domain, register a domain. To get that domain ready to serve your site content, update the Domain Name System (DNS) record to point to your org. Review your site URLs for potential conflicts, and complete the prerequisites for your chosen domain configuration option.

Required Editions

Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions.
Applies to: Salesforce Sites and LWR, Aura, and Visualforce sites

Determine Your Desired Domain Configuration Option

The domain configuration option for your domain specifies how the domain serves your site content via HTTPS. If you have Experience Cloud licenses, we recommend that you use the Salesforce content delivery network (CDN). For both Experience Cloud sites and Salesforce Sites, you can serve your domain with your HTTPS certificate on Salesforce servers. Or you can use a non-Salesforce service or CDN to host your domain.

If you don’t have a domain yet, your chosen domain configuration option can affect the features that you require from your domain name registrar. For example, if you chose to serve your site via a third-party CDN, you can select a company that provides domain name registration and the CDN service. For more information, see Determine How to Serve Your Custom Domain.

Register a Domain

If you own a domain such as www.example.com, you can use it to serve your site content.

If you don’t own a domain, choose a domain name and register it. When selecting a registrar, consider these factors.

  • If you require services other than domain registration, selecting a provider that offers multiple services can reduce your cost.
  • The reputation of the registrar or service provider. If you plan to bundle services, their reputation is especially important. Ensure that your selected provider offers sufficient privacy protections.
  • Salesforce doesn’t recommend registrable domains, such as example.com instead of www.example.com. If you choose to serve your site with a registrable domain, see the important considerations in the section on Registrable Domains.
  • The contract’s duration. A long-term contract can provide lower overall cost. With a shorter-term contract, if you become dissatisfied with the service, you can transfer your domain name to another company.

Registrable Domains

A registrable domain—sometimes called a root domain or naked domain—is the domain’s public suffix, such as .com or .org, plus the label to the left of that suffix. An example is example.com, without the www subdomain.

You can’t use the Salesforce CDN with a registrable domain. Because the Salesforce CDN is the recommended configuration for custom domains that serve Experience Cloud sites, Salesforce doesn’t recommend registrable domains.

If you choose to serve your sites on a registrable domain, ensure that your provider supports alias records or CNAME flattening.

One of the prerequisites for a custom domain is to configure a canonical name (CNAME) record on your domain that points to your Salesforce org. However, you can’t set a CNAME record on a registrable domain because of a DNS limitation. To bypass this limitation, some DNS vendors implement a CNAME behavior for registrable domains that mimics the standard CNAME behavior. To serve your site with a registrable domain, ensure that your DNS provider supports this workaround, which is often referred to as an alias record or CNAME flattening.

If your DNS provider doesn’t support this workaround, you can’t use your registrable domain to serve your Experience Cloud sites or Salesforce Sites.

If you choose to serve your sites on a registrable domain, we recommend that you configure enable HSTS preloading on the domain.

Update Your Domain DNS Record to Point to Your Org

Before you add a domain in Salesforce, update the DNS record for your fully qualified domain name (FQDN) to include your 18-digit Salesforce org ID. For more information, see Point Your Custom Domain to Your Salesforce Org.

Select the Org to Serve Your Site

Except for testing in a sandbox, a single fully qualified domain name (FQDN) is meant to exist in one org only. If you have multiple production orgs, determine the org in which to add and maintain the domain.

Note
Note Although it’s technically feasible for domains with the same FQDN to exist in multiple non-sandbox orgs, that configuration isn’t supported.

Review Your Site URLs for Potential Conflicts

If you host multiple sites on the same domain, be sure to review your site URLs for conflicts because it’s possible to configure the same URL for pages on two different sites.

Let’s say that you host Site A and Site B on the same domain, https://www.example.com. Site A’s URL uses the custom URL path prefix /products. Site B serves pages from the root path and has a page with the page path /products. As a result, both Site A’s URL and Site B’s page URL are https://www.example.com/products.

In this scenario, a site visitor can access the Site B page only through a navigation menu on Site B. If a site visitor navigates to https://example.com/products any other way, they’re directed to Site A.

If you identify a potential conflict, either rename the site path or choose a different path for serving the content on your custom domain.

Complete Additional Prerequisites Based on Your Chosen Domain Configuration Option

Review the prerequisites for your selected domain configuration option. See Prerequisites for a Custom Domain That Uses Your HTTPS Certificate, Prerequisites for the Salesforce CDN, and Prerequisites for a Custom Domain That Uses Your HTTPS Certificate.

See Also