Setting Up Custom Domains for Salesforce Sites and Setting up HTTPS Support for Branded Custom Domains

Table of Contents

 

Important Consideration: ** Custom Web addresses are not supported for Sandbox or Developer Edition organizations

Using Branded Domains with Salesforce involves two way set up which consists of performing the steps as explained in Section 1 and 2, section 3 would explain how to have your branded domain set up with HTTPS support:

(1) Creating a CNAME entry in your DNS
(2) Adding the Custom Domain information in Salesforce
(3)Adding HTTPS support to custom domains

Section (1) Creating a CNAME entry in your DNS

Step 1:

Grab the 18 digit token (case sensitive) from your org:
Set Up>Domain Management> Domains
Click on the button \”Add A Domain\”, you will see the section as follows: (grab the part as highlighted below in Figure 1.1)

Figure 1.1

\"User-added
Step 2:

Copy  the 18 digit token (case sensitive) from your org: i.e. 00d200000005pikra.live.siteforce.com  as shown in Figure 1.1 above

Step 3:

In your DNS, Create a CNAME as follows:

www.example.com > www.example.com.00d200000005pikra.live.siteforce.com

Which means appending the <18 digit unique token>.live.siteforce.com copied at step 2 to your original domain

** Depending on your DNS provider, this CNAME propagation might  take up to 48 hours.

Section (2) Adding the Custom Domain information in Salesforce

2(a) Adding the Domain Information to Salesforce Org
2(b) Mapping the Custom Domain to your Salesforce Site

2(a) Adding the Domain Information to your Salesforce Org

Once your CNAME propagation is complete, perform the following step:

– In your Salesforce Org, Go to Set Up>Domain Management> Domains
– Click on the button \”Add A Domain\” and enter your Custom domain in “Domain Name” field as shown in Figure 1.1 above

** If the section (1) is correctly performed and your CNAME propagation has not completed yet, you will see the following error:

Figure 2.1

\"User-added

If you see the error, wait for your CNAME to propagate and retry again once the propagation is complete. If the CNAME has not propagated yet, there is nothing that needs to be done at Salesforce end, you will just need to wait for it to propagate, or contact your DNS provider if it takes longer than 48 hours.

2(b) Mapping the Custom Domain to your Salesforce Site:

This Step can be subdivided into setting it up for a force.com site (includes communities exposed as force.com site) and Site.com

2(b)1 Setting up for force.com or Community exposed as force.com site:

-Skip to section 2(b)2 for setting up for Site.com Site

– In your Salesforce Org, Go to Set Up>Domain Management> Domains

-Click on the Domain that you added in Step 2(a) and click on “New Custom URL” button as shown below:

Figure 2.2

\"User-added

This will display the following:

Figure 2.3

\"User-added

For the field “Site”, click on the look-up icon to select the Salesforce Site to which you wish to map your Custom Domain.
For the field “Path”, enter the text if you wish to have a subdomain in your Custom Domain.

For Example:

If you have a Force.com Site as abc.force.com with label ABC, you will see ABC in the lookup for Site “field” and if you wish to havewww.example.com/customers   mapped to abc.force.com, then put /customers in the “Path” field.

Once you click Save, this will kick off reverse propagation from Salesforce end and once it is complete you should be able to navigate towww.example.com in your browser and you will see content from abc.force.com delivered successfully and the url in the browser will contain the branded www.example.com . If the reverse propagation is still underway, you will see Browser error, such as “Webpage not available”

2(b)2 Setting up Custom Domain for Site.com Site:

After finishing the step 2(a), Go to your Salesforce Org

-Go to the App Menu on the top right and select Site.com
-Click on Site.com Tab, this will list your Site.com Sites
-Click on Edit link for the Site.com site which you wish to be masked with your branded domain
-In the left pane, click on Site Configuration > Domains (As shown below in Figure 2.4)

Figure 2.4

\"User-added

-In the “Domain Name” field, enter your custom domain address, e.g. www.example.com and if you wish to have something likewww.example.com/customers  mapped to your Site.com Site,  then put /customers in the “Path” field and click “Add” button.

-Then, click “Publish Changes” button on top right.

– Once the propagation is successful, you receive the confirmation email as:

Congratulations! Demo_Site was published successfully and is now live on the following domain(s):
http://www.example.com

-Once you receive the email, you should be able to navigate to www.example.com OR www.example.com/customers  in your browser and you will see content from Site.com delivered successfully and the url in the browser will contain the branded www.example.com ORwww.example.com/customers

(3)Adding HTTPS support to custom domains

You can have https support for your custom domain, this would require you to get the Https Domains feature enabled by Salesforce.com Support.
Once you have the feature enabled, the Domains section as shown in Figure 1.1 will contain one extra field “Certificate and Key” as shown in Figure 3.1

Figure 3.1

\"User-added

First of all, a CNAME entry will be required to be created exactly as explained in Section (1)

A CA signed certificate which supports your branded domain is required. For that, you will need to create a certificate signing request as explained below:

(1)Go to Set Up > Security Controls > Certificate and Key Management
(2)Click on \”Create CA-Signed Certificate\”, this will open the page as shown in Figure 3.2 below:

Figure 3.2
\"User-added
For Figure 3.2, following is the explanation of all fields:

Label:

Enter a descriptive label for the Salesforce certificate.
This name is used primarily by administrators when viewing certificates.

Unique Name:

The 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 cannot end with an underscore or have two consecutive underscores.

Common Name:

This is your branded domain name, e.g.  www.example.com

Company:

The legal name of your company or yourself.

Department:

The branch within your company using the certificate, such as accounting, marketing, and so on.

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.

(3)Once you have saved the information in this section, your record will look as shown in Figure 3.3 below

Figure 3.3

\"User-added

As shown in Figure 3.3, click on “Download Certificate Signing Request” , this will download .csr file (certificate signing request), which needs to be sent to a CA (Certificate Authority) of your choice.

(4)After the certificate authority sends back the signed certificate, perform the following steps

(5)Setup > Security Controls >  Certificate and Key Management, click the name of the certificate, then click \”Upload Signed Certificate\”.

(6)Click Browse to locate the CA-signed certificate. The CA-signed certificate must match the certificate created in Salesforce.

If you try to upload a different CA-signed certificate, the upload fails.

(6)Click \’Save\’ to finish the upload process. Click Cancel at any time to not upload the certificate.

After you successfully upload the signed certificate, the status of the certificate is changed to Active.

Once you have performed the steps listed above successfully, go to Set Up>Domain Management> Domains (Figure 3.1) and enter your domain,www.example.com in ‘Domain Name’ field, and click on look-up icon for ‘Certificate and Key’ and select the certificate which you have added in the above steps. Once you click save, then you can create the mapping as explained in section 2(b) and once it is set up, it will look like as shown in Figure 3.4

Figure 3.4

\"User-added

Cheers!!!

Leave a Comment

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

Select Language »