---
title: "Setting up Heroku DNS using cloudflare"
description: "Setting up Heroku DNS using cloudlfare"
canonical_url: "https://www.bigbinary.com/blog/setting-up-heroku-dns-using-clouflare"
markdown_url: "https://www.bigbinary.com/blog/setting-up-heroku-dns-using-clouflare.md"
---

# Setting up Heroku DNS using cloudflare

Setting up Heroku DNS using cloudlfare

- Author: Neeraj Singh
- Published: September 26, 2022
- Categories: Misc

Lots of folks know [cloudflare](https://www.cloudflare.com/) for the DDoS
protection, rate limiting etc services it provides. Here at BigBinary, we also
use Cloudflare for DNS management.

DNS management is a free service by Cloudflare. However, on first glance, it
might not appear that it's a free service. Once we add a site, then we see a
screen like this. Here, we need to remember to scroll down to see the free
option.

![cloudflare pricing page](https://www.bigbinary.com/blog/images/images_used_in_blog/2022/setting-up-heroku-dns-using-clouflare/pricing.png)

Now let's see how we can map the DNS settings from Heroku to Cloudflare. We will
look at both a standard domain name and then we will take a look at a wildcard
domain name.

### Standard domain name

We are hosting [GitEmit](https://www.gitemit.com/) using Heroku. We are letting
Heroku manages the SSL for this domain.

After setting up domains in Heroku, here is what we see.

![Heroku DNS gitemit](https://www.bigbinary.com/blog/images/images_used_in_blog/2022/setting-up-heroku-dns-using-clouflare/heroku-dns-gitemit.png)

In Cloudflare, we can set it up using two CNAMEs. It looks like this.

![Heroku DNS](https://www.bigbinary.com/blog/images/images_used_in_blog/2022/setting-up-heroku-dns-using-clouflare/cloudflare-heroku-gitemit.png)

### Wild card domain name

We are hosting [NeetoChat](https://www.neeto.com/neetochat/) application using
Heroku.

Since it's a wild card domain, we had to
[generate the certificates](https://www.bigbinary.com/blog/wild-card-ssl-on-heroku)
ourselves.

After setting up domains in Heroku, here is what we see.

![Heroku DNS NeetoChat](https://www.bigbinary.com/blog/images/images_used_in_blog/2022/setting-up-heroku-dns-using-clouflare/heroku-dns-neetochat.png)

In Cloudflar,e we can set it up using three CNAMEs. It looks like this.

![Heroku DNS](https://www.bigbinary.com/blog/images/images_used_in_blog/2022/setting-up-heroku-dns-using-clouflare/cloudflare-heroku-neetochat.png)

## Links

- [Human page](https://www.bigbinary.com/blog/setting-up-heroku-dns-using-clouflare)
