Explain how to set up a custom domain for a Community.
Salesforce communities are assigned to a subdomain of force.com and a path on that subdomain. To brand the URL under which communities are accessible, custom domains and custom URLs can be configured.
When creating a new community a subdomain of force.com can be chosen, under which the community will be accessible. If multiple communities are created within a single Salesforce org, paths under the same subdomain can be configured.
Custom domains can be used to brand the URL under which communities are accessible to users. They can only be configured in Salesforce production orgs and are not available in sandboxes.
Configuring a custom domain consists of three steps:
The CNAME entry on the custom domain ensures that traffic to this domain is redirected to the community hosted by Salesforce.
Communities are identified by a unique URL in the format
<CustomDomainName>.[OrgId].live.siteforce.com. A CNAME DNS entry must be added on the custom domain that points to this URL.
For example, to configure a custom domain www.example.com for a community on org id 00d200000005abcde, a CNAME entry pointing to
www.example.com.00d200000005abcde.live.siteforce.com needs to be added.
DNS changes must propagate through the DNS system and it can take up to 48 hours until the changes are reflected worldwide.
Once the CNAME entries have propagated through DNS system, the custom domain can be added in Salesforce. This allows mapping the custom domain to the correct Salesforce site, such as a community.
To serve the custom domain over HTTPS, an SSL certificate can be created by Salesforce and linked to the custom domain. Alternatively, a third-party SSL certificate can be used for the same purpose.
Communities and domains can have a many-to-many relationship. A domain can host more than one community, and a community can exist on more than one domain.
If multiple communities are accessible on the same standard or custom domain, paths on that domain can be configured to distinguish the different communities.