Description
Implementing a custom domain for your community creates brand recognition and gives you additional control and functionality. We’ll go through how you can get your custom domain implemented.
Prerequisites & Assumptions
- Assuming your company domain is: www.mycompany.com
- Your custom community domain that you want to mask with is: customer.mycompany.com (customer.mycompany.com is equivalent to https://customer.mycompany.com)
- You Salesforce generated community domain that is going to be masked is: https://mycompany.force.com/customer/
- All sites are secure means we do have security certificate for our custom domain.
- You have salesforce administration permission.
Steps to setup the masking
Prepare Host-name for CNAME configuration from Salesforce:
Get Salesforce 18 digits organization id. You can get that easily by running query in developer console (Your Name → Developer Console → Query Editor)
SELECT Id from Organization
- Copy the Id and update it in lowercase. For example if it was received as 00D000000000052DNA then make it to 00d000000000052dna
- Now host name will be based on this formula: <custom community domain>.<18 digits org id in lowercase>.live.siteforce.com
customer.mycompany.com.00d000000000052dna.live.siteforce.com
Create a CNAME entry in your DNS
Ask your DNS provider to create a new CNAME with target prepared in last step. For example below:
- Add the domain information to your Salesforce Org
- Once CNAME propagation in DNS is completed, we can add this new custom domain in salesforce.
In your Salesforce Org, click Setup.
- Under “Administer,” Click Domain Management | click Domains.
- Click Add A Domain.
- Enter your custom domain in the Domain Name field.
Map the Custom Domain to your Community
In your Salesforce Org, click on Setup.
- Under “Administration,” click Domain Management | then click Domains.
- Click on the domain that you added.
- Click New Custom URL.
- You should be redirected to the Custom URL Edit screen.
- Select here your community in in site
- Keep path as it is.
Add HTTPS support to custom domains:
In above given 4 steps, we’ve completed domain masking successfully. But if you want your community to run over secure layer (HTTPS) then you’ve to add certificate as below:
Create a Certificate Authority (CA) Signed Certificate
- Click Setup.
- Under “Administer,” click Security Controls | then click Certificate and Key Management.
- Click Create CA-Signed Certificate.
Next, you’ll need to fill in all of the required fields. Here’s a description of what type of information each field is asking for.
- Label – A descriptive name for the Salesforce certificate. This name is used primarily by administrators when viewing certificates.
- Unique Name – Used by the API and managed packages. The name must begin with a letter and use only alphanumeric characters and underscores. The name can’t end with an underscore or have 2 consecutive underscores.
- Common Name – This is your branded domain name. For example Salesforce.com.
- Company – The legal name of your company or yourself.
- Department – The branch within your company using the certificate, such as Accounting or Marketing.
- State – The state or province where your company is located. Use the full name, not an abbreviation.
- Key Size – This must be 2048 for the certificate to be used with custom domain.
- Email Address – The email address to associate with this certificate.
- City – The city or locality where your company is located.
- Country Code – The two-digit ISO country code where your company is located. For the United States, it’s US.
Once you save the information you’ll see an updated record that reflects the information that you just entered.
- Click Download Certificate Signing Request.
- After the certificate downloads, you’ll need to send it to a CA of your choice.
After you get the certificate back
- Click Setup.
- Under “Administer,” click Security Controls | then click Certificate and Key Management.
- Click the name of the certificate, then click Upload Signed Certificate.
- Click Browse to locate the CAsigned certificate. The CA-signed certificate must match the certificate created in Salesforce.
– If you upload the wrong CA signed certificate, the upload will fail.
- Click Save.
After you successfully upload the signed certificate, the status of the certificate will change to Active.
After you’ve uploaded your CA signed certificate, go back to “Domains” and enter your domain into the Domain Name field. Click the lookup icon next to Certificate and Key, and you’ll be able to select your newly uploaded CA signed certificate.
That is the best blog for anyone who desires to search out out about this topic. You notice so much its virtually exhausting to argue with you (not that I actually would want匟aHa). You positively put a brand new spin on a topic thats been written about for years. Great stuff, just nice!