Step 2b - Add your root domain

I have a Heroku App,
and I’m following up this guide made by Cloudflare, and i’m stuck on step 2.b. ( Step 2b - Add your root domain).

— BEGINNING OF GUIDE —
Overview
Heroku is a cloud PaaS that supports several pre-configured programming languages. Heroku deals with all your infrastructure so you can focus on your application without having to work at the command line.
This article describes how to configure Heroku with Cloudflare to serve your traffic over HTTPS. For this article, we’ll assume that you already have an active domain on, as well as a running Heroku app.
Step 1 - Add a custom domain to your Heroku app
Follow Heroku’s instructions: Custom Domain Names for Apps.
Step 2 - Add a subdomain in Cloudflare DNS
Below, you will need to add DNS records for a subdomain and a root domain. Learn how to Managing DNS records in Cloudflare.
Step 2a - Add a subdomain
To start, log in to your Cloudflare account, navigate to the DNS app and add a ‘www’ C NAME record that points to the custom domain (also known as DNS target ) that you obtained in Step 1 above for your subdomain.
Step 2b - Add your root domain
Adding a root or apex domain on Heroku also requires using a C NAME record pointed from your root. You cannot use A records on Heroku because no IP addresses are exposed for Heroku users to use.
Fortunately, Cloudflare offers C NAME flattening to resolve requests for your root domain.
Add a C NAME record for your root (e.g. example .com) and point it to DNS target you obtained in Step 1 above for your domain.
— END OF GUIDE —

.- BACKGROUND-.
I want to combine Cloudflare’s free ssl with my heroku app, and my custom domain name. So far up until today, i’ve had heroku’s free plan with my custom domain name with no SSL.

.-THE ISSUE.
As i’ve mentioned, i’ve been following this guide but I got stuck on step 2.b.
Step 2.a. was very clear (my domain name is luckylove.co.il)
Type: CNAME, Name: WWW, Content: luckylove.co.il
This was easy. But what do I put in step 2.b? It is very unclear:
“Add a CNAME record for your root (e.g. example .com) and point it to DNS target you obtained in Step 1 above for your domain.”

Over at heroku i’m seeing these two:

Given all this, how should my second CNAME look like?

You would have a CNAME record luckylove.co.il that points to a valid DNS target.

Guys I found the answer!

So from heroku I got two things:

  1. For the domain name of .luckylove.co.il I got this: secure-clam-********.herokudns.com
  2. For the domain name of www.luckylove.co.il I got this: shrouded-snake-*********.herokudns.com

And what I needed to do was this:
Open Cloudflare Dashboard, got to the dns section, and there create 2 things:

  1. Create the 1st CNAME: Type = CNAME , Name = luckylove.co.il , Content = secure-clam-**********.herokudns.com , mark it as Proxied.
  2. Create the 2nd CNAME: Type = CNAME , Name = www , Content = shrouded-snake-**********.herokudns.com , and mark it as Proxied as well.

That’s it ! :slight_smile:
Now just wait about 24 hours for the name servers to update and BOOM! you have free ssl on heroku :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.