How to Generate CSR on Heroku?
Generating a CSR is the first step to obtaining an SSL certificate for your custom domain hosted on Heroku. An SSL certificate secures your domain with HTTPS and encrypts traffic between users’ browsers and your app. Generating a CSR and obtaining an SSL certificate for your Heroku app is an essential first step to securing your custom domain, encrypting the data transfer, improving user trust and SEO, and adhering to security best practices and compliance requirements. The benefits of HTTPS & SSL outweigh any costs or effort involved in obtaining and managing certificates.
Here are the detailed steps to generate a CSR (Certificate Signing Request) in Heroku:
Step by Step process on Generating the CSR in Heroku:
- Log in to your Heroku account and go to the app settings of the app you want to generate a CSR for.
- Go to the “Domains and certificates” section under “Settings.”
- Click the “Manage custom domains” button.
- Click on the “SSL/TLS” tab.
- Click the “Generate SSL Certificate” button.
- In the “Generate CSR” modal, enter the following:
- Common Name: The Domain Name for your App/Website (e.g. example.com)
- Email Address: Your Email Address
- Country code: Your Country Code 2 Character (e.g. US for the United States)
- State/Province name: Your state or province
- Locality: Your City
- Organization Name: Your Company or Organization Name
- Click the “Generate CSR” button to generate the CSR and download a CSR.csr file to your computer.
- Send the CSR.csr file to the Certificate Authority (CA) you choose. The CA will use the CSR to issue an SSL certificate for your domain.
- Once you receive the SSL certificate from the CA, upload the certificate files to Heroku:
- Certificate (yourdomain.crt): This contains the certificate data
- Intermediate certificate (intermediate.crt): This contains the intermediate certificate issued by the CA chain
- Private key (yourdomain.key): This contains the private key used to generate the CSR
- Click “Upload certificate” in Heroku and select the 3 certificate files mentioned above.
- Click “Review and apply” and then “Apply certificate.” Heroku will install the SSL certificate and secure your domain, or follow these steps to Install SSL on Heroku.
- You can verify the SSL certificate is installed by visiting your domain URL in a browser with “https://” (e.g. https://example.com) and checking for the green lock indicating a secure connection.
Check our resource guide to Generate CSR on Different Web Servers.