DEV Community

Tomas Valent
Tomas Valent

Posted on

Heroku Cloudflare https

Let say you own a domain sholi.app this short article explain how you configure https://www.sholi.app behind Cloudflare to communicate with app running under Heroku

step 1. In Cloudflare add a new site (Add Site button). Fill in the domain name (sholi.app).

step 2 In next step Cloudflare will tell you what are the NS records. Go to your domain provider (Godaddy, Porkbun, Route53,...) and change domain NS to this value

step 3. in Heroku app dashboard go to app's Settings "Domains" section add a domain www.sholi.app and copy the DNS Target value (needed in step 5)

Image description

step 4. in Heroku app dashboard app's Settings in "SSL Certificates" create certificate for domain

Image description

Image description

step 5. in Cloudflare domain's DNS settings update DNS Records:

  • A Record @ (root) point to 174.129.25.170 (wwwizer)
  • CNAME Record www point to DNS Target from step 3

Image description

step 6. in Cloudflare domain's SSL settings set strict cert

Image description

step 7. in Cloudflare domain's SSL settings set https always on

Image description

curl https://www.sholi.app

Links:

Top comments (0)