Pardot – Salesforce marketing automation solution: How to SSL-enable (HTTP Secure) URLs

A lot of companies use Salesforce automation tools to become more efficient and boost their marketing and sales results. Pardot is one of such popular solutions and it proves to be really effective when it comes to managing online marketing campaigns using one central platform. The tool helps sales departments increase marketing productivity, create custom emails, calculate marketing ROI etc. However, this post is not about accelerating your marketing campaign. Right now, I’m going to share with you a simple method that will help you to SSL-enable Pardot URLs.

When you insert a Pardot URL into an HTTP Secure page (HTTPS) on your website, you get a security error as Pardot does not provide a certificate for tracker subdomain (CNAME). A fix for this issue was described in article “How to SSL-enable (HTTP Secure) Pardot URLs” in Pardot Knowledgebase.

[announce]

The method that was described in this article works but doesn’t allow to use a custom domain name, which is not so good. For example, we have website https://ourcompany.com and CNAME http://cname.ourcompany.com, attached to Pardot. According to Pardot Knowledgebase, we need to use https://go.pardot.com for all our forms and files, but we will use the proxy instead.

For our SEO-friendly method Nginx web server will be needed (or any other supporting https proxy). We will use the subdomain (https://resources.ourcompany.com) for all Pardot forms and functionality but it’s also possible to use subdirectories. I will add the example of configurations for both options.

Now we need to replace our CNAME (http://cname.ourcompany.com) portion of the URL with https://resources.ourcompany.com on all  HTTP Secure pages (HTTPS) of our website.

Examples:

Original Pardot URL:

Updated HTTP Secure URL:

Pardot Form iframes

Original Pardot CNAME iframe Code:

<iframe src=”http://cname.ourcompany.com/l/10/2011-00-02/12345″ width=”100%” height=”500″ type=”text/html” frameborder=”0″ allowTransparency=”true” style=”border: 0″></iframe>

Updated HTTP Secure iframe Code:

<iframe src=”https://resources.ourcompany.com/l/10/2011-00-02/12345″ width=”100%” height=”500″ type=”text/html” frameborder=”0″ allowTransparency=”true” style=”border: 0″></iframe>

A few lines of Nginx configuration:

server{

         listen 443;

         ssl on;

         …

         server_name resources.ourcompany.com

         location / {          

                  proxy_set_header Host $host;

                  proxy_set_header X-Real-IP $http_x_cluster_client_ip;

                  proxy_set_header X-Forwarded-For $http_x_cluster_client_ip;
                  
                  proxy_set_header X-Forwarded-Proto "";

                  proxy_cookie_domain go.pardot.com resources.ourcompany.com;

                  proxy_pass      https://go.pardot.com;

                  proxy_redirect 'http://storage.pardot.com' /file;

                  proxy_redirect 'https://storage.pardot.com' /file;     

         }

         location /file/ { 

                  rewrite ^/file(/.*)$ $1 break; 

                  proxy_set_header Host $host;

                  proxy_set_header X-Real-IP $http_x_cluster_client_ip;

                  proxy_set_header X-Forwarded-For $http_x_cluster_client_ip;         

                  proxy_pass   http://storage.pardot.com;

         }

}

Congratulations!

*Do not forget to restart nginx daemon.

In case of using subdirectories, for example, https://ourcompany.com/resources/ and https://ourcompany.com/resources/files/, we need to replace our CNAME (http://cname.ourcompany.com/) portion of the URL with https://ourcompany.com/resources/

And Nginx configuration example:

server{

         listen 443;

         ssl on;

         …

         server_name ourcompany.com;

         …

         location /resources/  {  

                  rewrite ^/resources(/.*)$ $1 break;             

                  proxy_set_header Host $host;

                  proxy_set_header X-Real-IP $http_x_cluster_client_ip;

                  proxy_set_header X-Forwarded-For $http_x_cluster_client_ip;

                  proxy_set_header X-Forwarded-Proto "";

                  proxy_cookie_domain go.pardot.com ourcompany.com;

                  proxy_pass      https://go.pardot.com;

                  proxy_redirect 'http://storage.pardot.com' /resources/file;

                  proxy_redirect 'https://storage.pardot.com' /resources/file;

         }

         location /resources/file/ { 

                  rewrite ^/resources/file(/.*)$ $1 break;

                  proxy_set_header Host $host;

                  proxy_set_header X-Real-IP $http_x_cluster_client_ip;

                  proxy_set_header X-Forwarded-For $http_x_cluster_client_ip;

                  proxy_pass   http://storage.pardot.com;

         }

}

 

Notes:

  • This method has an issue with visitor’s IP address. As Pardot currently uses only last IP, it will be the IP of our server. Hope, in future they will use X-Real-IP  or X-Forwarded-For . (As all your prospects are saved to cookies, this issue can be ignored in most cases).

Insights from our Consulting Department

January 22, 2019
How To Convert Traffic into Sales with Lead Conversion Strategy
October 15, 2016
How to Create the Smartest Chatbot Ever With IBM Watson Services

2 thoughts on “Pardot – Salesforce marketing automation solution: How to SSL-enable (HTTP Secure) URLs

Leave a Reply

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