How to Install an SSL Certificate on a Heroku Server?

2 votes, average: 5.00 out of 52 votes, average: 5.00 out of 52 votes, average: 5.00 out of 52 votes, average: 5.00 out of 52 votes, average: 5.00 out of 5 (2 votes, average: 5.00 out of 5, rated)
Installing an SSL certificate on Heroku SSL

Quick Tutorial on How to Secure Your Heroku Serve by Installing an SSL Certificate

If you want to install an SSL certificate on your Heroku server but lack the necessary expertise, this article is for you. But, before we start exploring the installation process, it is essential to address a prerequisite: CSR Generation.

How to generate a CSR for the Heroku server?

CSR (Code Signing Request) file contains essential details about your domain and organization, which the Certificate Authority (CA) uses to validate your SSL application. You have two options to generate a CSR for the Heroku server:

Option 1: Utilize our CSR Generator tool that automates the process of creating a CSR and private key based on your provided information.

Option 2: Generate it manually in your local environment. If you choose the second option, it is crucial to double-check and ensure the accuracy and currency of all the information included in the manually generated CSR. Any inaccuracies or outdated details can result in the CA rejecting the certificate signing process. After successfully generating the CSR, submit it for validation to the CA.

How to install an SSL certificate on Heroku?

To install an SSL certificate on Heroku, you can follow the four-step approach summarized beneath:

  • Acquiring and Preparing the Certificate Files
  • Merging the Certificate Files
  • Deploying the SSL Certificate
  • Verifying the Installation

Acquiring and Preparing the Certificate Files

After your CSR is verified, the CA will issue your SSL certificate along with additional files necessary for installation. Ensure you have the following files ready:

Merging the Certificate Files

Before installing the SSL certificate on Heroku, you must combine the main certificate and the CA Bundle into a single file. This ensures seamless installation. Follow these steps:

  • Open the main certificate file (.crt) and the CA Bundle file (.ca-bundle) using Notepad.
  • Copy the contents of the CA Bundle file and paste them below the contents of the main certificate file.
  • Save the combined file without any spaces between the codes

Deploying the Certificate

You can accomplish this using the Heroku Dashboard or the Command Line Interface. Use the most comfortable option.

Using Heroku Dashboard

  • Login to Heroku Dashboard and open the certificate.
  • Click Settings after selecting your application.
  • Scroll down to the Domains and certificates section, and click on the Configure SSL button.
  • From the Configure SSL list, select the radio button in front of the Manual option and click Continue.
  • Drag and drop the certificate as well as the CA Bundle file into the designated box.
  • Now, drag and drop your Private Key file into the designated box.
  • Update the DNS records of your custom domain or subdomain using the provided values. (To configure your DNS settings for Heroku, determine the Host value, i.e., your domain or subdomain, and the Target value, i.e., your domain or ) For example – To configure your DNS settings, create the CNAME records in your DNS settings in this manner for your:


  • Name:
  • Points to:


  • Name:
  • Points to:
  • After configuring the DNS, click ‘I’ve done this‘ and then proceed by clicking on Continue.

Command Line Interface

  • Open your command line interface and run the following command:
  • heroku certs:add server.crt server.key If your certificate is associated with a specific Heroku app, include the –app flag and specify the app name in the command. For example – heroku certs:add server.crt server.key –app yourappname.

Verifying the Installation

To confirm whether the SSL certificate has been successfully deployed on your Heroku server, you can utilize the heroku certs:info command. If you encounter an error message, performing the process again from the initial step is advisable.

You also have the option to utilize SSL testing tools such as SSL Checker. These tools are designed to efficiently detect any vulnerabilities or potential errors in your SSL setup. By leveraging these tools, you can obtain a comprehensive report that offers detailed insights into any issues affecting your SSL configuration.

How to Update the SSL Certificate on the Heroku Server?

The Installation and Updation processes are the same if you use the Heroku dashboard. However, if you prefer using the CLI for updating the certificate, there is a slight variation. Instead of utilizing the heroku certs:add command, you should employ the heroku certs:update command. The proper formatting for the command is as follows: “heroku certs:update server.crt server.key.”

How to Delete the SSL Certificate on the Heroku Server?

Using the Heroku dashboard to delete the certificate:

  • Login to Heroku Dashboard.
  • In the Domains and certificates section, click Configure SSL.
  • Click on the radio button in front of the Remove SSL option.
  • Click Continue.
  • In the Enter your app’s name to confirm you want to permanently delete your SSL certificate box, type the app’s name.
  • Click Remove SSL.

Using the CLI to delete the certificate:

  • Open the CLI window,
  • Type the heroku certs:remove command and press Enter.
  • Type the app’s name and press Enter.

Where to Buy an SSL Certificate for the Heroku Server?

Discover the ultimate solution for unbeatable SSL security on your Heroku server at an exceptional value! Introducing Cheap SSL Web, where we prioritize your website’s protection by partnering with top SSL brands in the industry. Moreover, our exceptional support will provide you with the peace of mind that your website is well taken care of.

Make the most of our substantial discounts to save even more on your SSL requirements. Don’t settle for subpar protection – choose Cheap SSL Web as your go-to destination for all your SSL needs.

COMODO Multi-Domain SSL – Save Up to 90%

Buy or renew Comodo Multi-Domain SSL certificates from the most trusted Certificate Authorities. Add, remove, and update up to 250 domains on multiple servers on a single Multi-Domain SAN Certificate.

Janki Mehta

Janki Mehta is a Cyber-Security Enthusiast who constantly updates herself with new advancements in the Web/Cyber Security niche. Along with theoretical knowledge, she also implements her practical expertise in day-to-day tasks and helps others to protect themselves from threats.

Buy Cheap Wildcard SSL