Cover image for How to connect GoDaddy domain with Heroku and Cloudflare

How to connect GoDaddy domain with Heroku and Cloudflare

spyker77 profile image Evgeni Sautin ・2 min read

Well, if you (as me just recently) struggle to connect newly registered domain from GoDaddy with your app at Heroku, and in addition would like to use advantages of Cloudflare – this article is for you 🎯

Though you can find some useful information on the web, nothing worked for me out of the box and since I don't do this procedure on a daily basis, it wasn't obvious where is the mistake. Hope it will help you and without many words, let's jump in!


👉 Heroku settings
👉 Cloudflare settings
👉 GoDaddy settings


Step 1: Go to your app's settings on Heroku.

Heroku - Settings

Step 2: Scroll down to the domains section and click "Add domain".

Heroku - Domains

Step 3: Enter your domain name that you've got from GoDaddy and click "Next".

Heroku - Domain Name

After clicking "Next" you'll be given a "DNS target" record that you need in the next steps.


Step 1: Go to the "DNS" tab of your site and click "Add record" in DNS management section.

Cloudflare - DNS Section

Step 2: Enter two CNAME records. First has the name of your domain and target – is your "DNS target" record from last step at Heroku. Second CNAME record must have the name of www and the same targer record from Heroku. In order to finish with this tab, copy provided nameservers as you gonna need them soon.

Cloudflare - DNS Records

Step 3: Go to the "Page Rules" tab and let's add redirect from www address to the main clean one. For example, in my case www.skillhunter.app redirects to skillhunter.app. Pay attention to asterisk (*) character in the first record and trailing $1 in the last one.

Cloudflare - Page Rules


Step 1: From your product's page click on "DNS" related to your domain.

GoDaddy - Products Page

Step 2: Now you should see DNS records similar to the following.

GoDaddy - DNS Management

Step 3: Scroll down to the Nameservers section and click "Change".

GoDaddy - Change Nameservers

Step 4: Click the phrase "Enter my own nameservers (advanced)".

GoDaddy - Enter Nameservers

Step 5: Enter the nameservers, that you've copied at step 2 of Cloudflare settings and click "Save".

GoDaddy - Save Entered Nameservers

Congrats 🎉

You did it! Just don't forget to wait, as DNS records update may take up to 72 hours.

Last but not least, big shout out to Clint Adair from Unsplash for cover photo!

Posted on by:

spyker77 profile

Evgeni Sautin


Hey folks 👋 I'm getting into programming as a self-taught Python developer. So freaking exiting, though should say it's kind of heavy lifting for a person without much of technical background.


markdown guide