4

I see that people have had issues in the past with Heroku and SSL and matching .pem certs (like this: Heroku SSL error: key doesn't match PEM certificate).

However, our site has had ssl running fine, until it expired. We renewed with GoDaddy and have been following the instructions here: http://blog.matthodan.com/how-to-setup-heroku-hostname-ssl-with-godaddy

Now the weird thing is is that we're continually getting this read out- "Pem is invalid / Key doesn't match the PEM certificate"

Community
  • 1
  • 1
zkidd
  • 513
  • 1
  • 5
  • 18

2 Answers2

1

I recently renewed my ssl cert for heroku hosted domain registered at godaddy. I did the following:-(Do not remove old cert at heroku)

  1. apply renewal credit at godaddy and use the previous certificate signing request(csr), selecting option of third party hosted domain and submit.
  2. After the certificate has been issued by godaddy download certs for 'Nginx' server. unzip the zipped file, cd into directory, and combine certificates.

    cat 48bcdx31xxxx.crt sf_bundle-g2-g1.crt > combined.crt

  3. run certificate update command heroku certs:update combined.crt server.key

  4. Confirm the changes by typing app_name.
  5. Check your certs heroku certs:info --app=app_name

Done! and after few seconds app is running on previous ssl endpoint url. So, No need to update dns.

lightsaber
  • 1,481
  • 18
  • 37
0

Those of you who are having hard time getting your app running on Heroku again, after renewing the SSL certificate on GoDaddy. Here is how I fixed the problem:

  1. Remove the old certificate from Heroku using the following command

    $ heroku certs:remove

  2. After renewing the certificate on GoDaddy, download the certificate (choose "ngnix" as a web server).

  3. Unzip the downloaded file and then go into the folder in your terminal ( You should see two files - in my case I had a file with a weird name 82321234a.crt and gd_bundle.crt)
  4. Run the following command there to create a new CRT file:

    $ cat 82321234a.crt gd_bundle.crt > combined.crt

  5. Go into your certificate folder for your application in your terminal

  6. Add the new certificate to Heroku using the following command

    $ heroku certs:add combined.crt server.key

And, that's it!

I hope this helps.

Yosep Kim
  • 2,931
  • 22
  • 23