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] to 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 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 are 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 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 🙂
25 thoughts on “How To Configure a Custom Domain for Your Community”
i have created a free domain from freenom, do we need to get host also?
Hi Priya, no, you don’t need to get the hosting.
Hi Ashish, If this option is not available for developer edition.Where else we can test it?As i can see we get free trials only for developr and professional edition.But in professional edition i dont see option to enable community
Hi Priya, one option to test is to sign up for the trial org at URL https://www.salesforce.com/ap/editions-pricing/sales-cloud/. But do note that the trial org expires in 30 days.
Thanks for this write-up! FYI, there is a new required prerequisite for this configuration to add a second CNAME entry with hostname _acme-challenge.[domain] and target _acme-challenge.[domain].[orgID].live.siteforce.com
You may want to update your screenshot and add a step.
Thanks for the update, Marc. Much appreciated.
Hi, does this work for non-Salesforce hosts where we have our own CDN?
Hi MF, In screenshot no. 7 from top, I do see an option to choose “A non-Salesforce host or service serves this domain over HTTPS” so my guess will that it should work if you have your own CDN. But it will be better to confirm this with Salesforce Support to get an official answer.
I don’t have the option of creating a new domain. I am sys admin in my org, what could be the reason?
Which org are you trying to configure this on? Production, Sandbox or Developer?
Very good post!
I have a requirement where my community can be referenced in multiple sites where the customer can
enter, but when the customer enter to the community I need to know in which page they click the URL of
Is there some way to know this?
Hi Deivid, I am not sure if there is a feature in Salesforce Community to track this. But outside of Salesforce, you can use Google Analytics with UTM parameters to track such clicks.
We have requirement to such that both : mydomain.com and http://www.mydomain.com should work seamlessly for the same site.
Can this be achieved through salesforce domains. Will we be able to create different domains in salesforce for the above two (with and without www.)
OR Shall we create only one in Salesforce with http://www.mydomain.com and redirect the root/naked domain mydomain.com to http://www.mydomain.com in DNS.
Thanks in advance.
Hi Aziz, I think the second option will be a better option. That is create only one domain http://www.mydomain.com redirect the another one to the main domain.
Thanks for this , is is possible to test the custom domain on Sandbox?
Looks like it is possible, Sanjeev. Please refer to this help article – https://help.salesforce.com/s/articleView?id=sf.domain_mgmt_sandbox_custom_domains_setup.htm&type=5
This post is very helpful.
We have a requirement where domain registered is abcatwest.ca
and they want the domain for experience site in salesforce should be abcatwest.ca/Connect
1.How i can achieve this ? Do i need to create path in custom URL when we define Domain and Site ?
2. Site we map to domain, in your picture it is custom community which refers to the community you just created — (asagarwal.force.com)
Any help is highly appreciated. Many Thanks!
Thanks Nikita. I think it should be possible. If you look at this blog post, after you add the custom domain, there is a step to add the Custom URL. You should be able to add the path in the custom URL.
I have requirement like if we have more that 1 custom domain/subdomain then how it will connect to the one community?
Example : ABC is a group of company and it has P1 and P2 partner and they has different domain like (P1 : http://www.p1.com, P2 : http://www.P2.com) and in the salesforce org we have on partner community then it is possible to link both the custom domain (www.p1.com, http://www.p2.com) to one partner community?
Thank in advance 🙂
Hi Hemant, I doubt if this can be done but better to check with Salesforce support by logging a ticket. Though based on the scenario that you have mentioned, I do wonder why you would want to do that. If ABC has partners, then the community domain should be something like abc.com/partners and not p1.com or p2.com. Also, domain p1.com and p2.com will be owned by partners and you won’t be able to make any changes to their DNS records.
Does it work for Dev ORG?
Hi Vitaly, to the best of my knowledge, it will not work for dev org because you cannot add any other domain apart from My Domain in the developer edition. If you notice the Domains page in setup, the ‘Add a Domain’ action is missing because it is available only in Professional, Enterprise, Performance, and Unlimited Editions as per this Salesforce Help Article https://help.salesforce.com/articleView?id=domain_mgmt_add.htm&type=0 So without adding a domain you will not get the CNAME or a TXT value that is required in the DNS setting of your website.
Hope this helps. Regards, Ashish
Thank you for the detailed explanation! This is very helpful! Do you have any information on how to configure an SSO for two separate communities?
Thanks for the feedback Tiffany. What exactly are you referring to by “how to configure SSO for two separate communities”? Are you looking for logging on to communities using Facebook/Google/Twitter etc.?
thank you honestly,i was looking for how to enable the cdn function for a customer community,this article helps alot