How To Configure a Custom Domain for Your Community
If you are using Salesforce Community, you can change the community URL to be your branded URL. For example, when you create a community on Salesforce, by default the URL is going to be something like <name>.force.com or let’s say asagarwal.force.com. But you can change this to customers.asagarwal.com or whatever you want it to be if you own that domain. And it is simple to achieve this (say about 10–15 minutes effort or less)
For example, let’s say that you have defined a community in Salesforce and your default Salesforce Community URL is https://asagarwal.force.com/customers as shown below
Now the customers will need to use the URL https://asagarwal.force.com/customers to go to this community, as shown below. Well, this is okay but not great. We can do better here.
To change this URL to something more branded, you will need to add a CNAME or a TXT record to your domain settings. To get the value for the CNAME/TXT record, navigate to Setup (in Salesforce) → Domains → Add a Domain
And copy the value that is shown on the screen. For example, “[domain].00xxxxxxxxxxxxxxak.live.siteforce.com”. Replace the value of [domain] with the branded domain that you want to set the value to. For me, it will be “customers.asagarwal.com.00xxxxxxxxxxxxxxak.live.siteforce.com”
Now, navigate to the DNS settings of your domain and add a CNAME or a TXT record pointing to the value copied above
And then navigate back to Salesforce and add the domain record. If you try to complete this step without adding the CNAME/TXT record in your DNS settings, you’re going to get an error
Once added, Salesforce will provision the custom domain for your Community. Wait for Salesforce to complete this step (i.e., the status will change from ‘Provisioning’ to ‘Completed’). This may take a few hours (in my case, it took about 5–6 hours).
Now, all we need to do is to map this domain to the specific community in Salesforce. Navigate to Setup → Custom URL → New Custom URL
Select the custom domain and the specific community to map the two and click Save
Check if provisioning has been completed for the custom domain and activate the custom domain. This may take another 10–15 minutes to complete
That’s it. Now share your branded URL (‘customers.asagarwal.com’ in my case) with your customers, sit back and gloat about it :-)