I am using Heroku to host which provides me a nice https: address:


I use Namecheap to setup my DNS and I do this using:

CNAME Record | www | www.my_domain.herokudns.com.

I found this information using heroku domains in the macOS bash console.

www.my_domain | CNAME | www.my_domain.herokudns.com

Everything works fine except the s gets dropped off the Heroku address when I use my custom domain.


It is a bit odd that Heroku will provide an https:// address but not allow you to redirect to it.

You might contact their customer support and ask how to setup the CNAME properly so that you can use the certificate they already have created for you.

Changing ...

www.my_domain | CNAME | www.my_domain.herokudns.com

is key to fixing this issue.


According to Heroku Dev Center Custom Domain Names for Apps there's a different pattern for TLS hostnames:

If you’re using the SSL Endpoint, note that your DNS Targets will be a little different. For apps in the Common Runtime, the endpoint domain name will have a name in the form of example-12345.ssl.herokudns.com.

While every app may be served on HTTPS with the default *.herokuapp.com hostname, using your own domain requires a matching TLS certificate. Steps for using own certificates with your apps are described in the SSL Endpoint documentation. In short:

  1. Generate private key & certificate signing request CSR with OpenSSL:

    openssl genrsa -des3 -out server.pass.key 2048
    openssl rsa -in server.pass.key -out server.key
    openssl req -nodes -new -key server.key -out server.csr
  2. Purchase a certificate using the CSR.

  3. Create the add-on & add your certificate:

    heroku addons:create ssl:endpoint
    heroku certs:add server.crt server.key --type endpoint
  • Oh snap ... I thought I had SSL b.c. I saw the s on the https://. I have to make my own and pay for it ... is dnsimple.com a simpler way to do this? – Jamie Siminoff May 21 at 5:15
  • Unfortunately this site is not for product or service recommendations, so I'm not taking sides. – Esa Jokinen May 21 at 5:18
  • You could probably make Let's Encrypt grab a cert, but you still have to pay Heroku to host it. – Michael Hampton May 21 at 6:45
  • Automating Let's Encrypt with Heroku might be painful. – Esa Jokinen May 21 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.