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> or let’s say But you can change this to 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)

Custom Domain for Salesforce Community

For example, let’s say that you have defined a community in Salesforce and your default Salesforce Community URL is as shown below

Custom Domain Salesforce Community

Now the customers will need to use the URL to go to this community, as shown below. Well, this is okay but not great. We can do better here.

Custom Domain in Salesfore Community

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

Custom Domain in Salesforce Community

And copy the value that is shown on the screen. For example, “[domain]“. Replace the value of [domain] to the branded domain that you want to set the value to. For me it will be “

Custom Domain for Salesforce Community

Now, navigate to DNS settings of your domain and add a CNAME or a TXT record pointing to the value copied above

Custom Domain for Salesforce Community

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

Custom Domain for Salesforce Community

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)

Custom Domain for Salesforce Community

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

Custom Domain for Salesforce Community

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

Custom Domain to Salesforce Community

That’s it. Now share your branded URL (‘‘ in my case) with your customers, sit back and gloat about it 🙂 

Custom Domain for Salesforce Community

27 thoughts on “How To Configure a Custom Domain for Your Community”

  1. Thanks, was really helpful. We were able to configure in few clicks everything just following the steps.

  2. 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

    1. 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.


    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
    my site.

    Is there some way to know this?


    1. 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.

  4. Hi Ashish,
    We have requirement to such that both : and 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 and redirect the root/naked domain to in DNS.
    Thanks in advance.

  5. Hi
    This post is very helpful.
    We have a requirement where domain registered is
    and they want the domain for experience site in salesforce should be

    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 — (

    Any help is highly appreciated. Many Thanks!

    1. Ashish Agarwal

      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.

  6. Hello,
    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 :, P2 : and in the salesforce org we have on partner community then it is possible to link both the custom domain (, to one partner community?

    Thank in advance 🙂

    1. Ashish Agarwal

      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 and not or Also, domain and will be owned by partners and you won’t be able to make any changes to their DNS records.

    1. Ashish Agarwal

      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 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

  7. 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?

    1. 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.?

  8. thank you honestly,i was looking for how to enable the cdn function for a customer community,this article helps alot

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass