function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Neil ChelliahNeil Chelliah 

How do you use a custom domain when enabling Communities?

How do I assign a custom domain when enabling Communities?  The Salesforce Help article states that it's possible but doesn't explain how and tech support hasn't been able to resolve it either.  I've gone to Domain Management>Domains and added a new domain (ex. community.company.com).  We've updated our domain controllers to include the appropriate CNAME records as required.  But when going to Customize>Communities>Settings and checking Enable Communities, it still forces you to select a domain that ends in ".force.com", not your custom domain.  We're building an external site which our company cannot include the ".force.com" ending.
Phil WeinmeisterPhil Weinmeister
Hi Neil,

I know that this is supposed to be supported, based on documentation and first-hand feedback from Salesforce.

Have you enabled HTTPS custom domains for your organization? This is required.
Are you testing this in a sandbox or in Production? Custom domains are supported only in non-sandbox instances.
Do you have more than one community on the domain? If so, you'll need to use Custom URLs.

Can you post a screenshot of the domain details?

Thanks,
Phil
Neil ChelliahNeil Chelliah
Thanks, Phil. Looks like there’s a lot of conflicting documentation floating around causing confusion, but Developer support finally provided specific instructions on how to set this up, which we were able to do successfully on Friday. Neil
Phil WeinmeisterPhil Weinmeister
Awesome. Can you send me (mailto:philweinmeister@yahoo.com) what they sent you? I would love to see it. Thanks!
Neil ChelliahNeil Chelliah
Here’s the instructions: HOW TO ENABLE A CUSTOM DOMAIN IN A COMMUNITY 1. First you have to enable communities, a. Setup>Customize>Communities>Settings i. Enter a custom name for your domain (ex. Test.force.com) when enabling communities. This will NOT be your final custom domain but you are required to enter something at this step. 2. Create a custom domain a. Setup>Domain Management>Domains i. Add custom domain name ii. Create a CNAME pointer in your domain controller per instructions listed on this page. 3. Create the Custom URL as well. a. Setup>Customize>Communities>Manage Communities i. Click the Force.com link next to the Community name ii. Click New Custom URL 1. You will find 2 fields. (1) Domain and (2) Path a. Select your custom domain name (created in Domain Management) in the Domain look-up field b. Select ‘/’ in Path field Your new Community will now use your custom domain. By default, when attempting to access your new domain, you’ll be directed to a Salesforce login page. You can circumvent this by creating a new VisualForce page and directing this as the landing page, making your Community externally-accessible.
Phil WeinmeisterPhil Weinmeister
Thanks. Can you send me the details related to this: “ Create a CNAME pointer in your domain controller per instructions listed on this page” Thanks!
Neil ChelliahNeil Chelliah
When you go to Domain Management and add a new Domain, the resulting Salesforce page will have additional information regarding the CNAME pointer along with your specific instance API ID. It will actually give you a couple options on how to set this up in your domain controller. We chose the CNAME method. But it’s important you follow this step specifically as the Salesforce page states because it needs your instance’s unique ID to work.
Ramm Majji [contractor]Ramm Majji [contractor]
Phil and Neil, I followed the exact instructions provided by SF and also mentined by Neil but the custom domain in the URL is replaced by the force.com domain name. Please let me know the correct details..
Siobhan NordstromSiobhan Nordstrom
I am also trying to set up a custom domain. Any luck here with the custom domain?
Megan D MoodyMegan D Moody
Same thing here. I can enter my custom domain into a browser, but it only redirects to the force.com URL. 
Damien RibbansDamien Ribbans
Hey, we have been trying to do this without success - essentially we have built a Salesforce Community which we want to act as our website and use the noisesolution.org domain and subdomains.

Our web developer (not Salesforce specific) can't do it, and we had a pro bono request from Salesforce (we are a non-profit) come back with the following response:

I further worked on it and below is my analysis:
- Remote address is throwing the 404 response
Status code:  404
Remote Address: 217.160.0.196:443
- On accessing the workspace for the community " Website " also, I am getting the same error 404 response
- If I access the community on site.com platform with force.com domain, it is working fine without any issue
https://noisesolution.force.com/website/s/ 
- For confirming that the issue is from CDN side, I added host to the network traffic and the workspace is getting loaded without any issue.
- For reference, please find the attached video

- So the issue is coming from the CDN side and you need to reach out to them as we do not have access to the CDN configuration.

This is way outside our skillset! Can anyone help? We would potentially be happy to pay someone to fix this for us too. We just need it sorted!