Custom Domains with Heroku

I recently rewrote the Montreal Dribbble Meetup website using Sinatra. The previous version was simply static HTML and CSS files, so hosting and using a custom domain name was easy.

Since I moved to something dynamic (for various reasons), I decided to host the website on Heroku for simplicity reasons. Pushing something to Heroku is beautifully simple, but unfortunately looking at the Heroku documentation, I discovered that Hover, where I had my domain name doesn’t support setting a CNAME for root domains. Bummer.

 
Asking around on Twitter, there didn’t seem to be any consensus on what to use.

Fortunately, Heroku provides a list of DNS services that support that feature. Looking at the list, the only two names that rang a bell were DNS Simple and CloudFlare. DNS Simple’s pricing structure seems uh… anything but simple. So I went with CloudFlare. For my needs, the free CloudFlare plan was more than enough.

The setup process is surprisingly pretty seamless. You enter your domain name and they import your existing DNS records and tell you exactly what to replace in order to switch over to Cloudflare. Kudos for the amazingly simple onboarding experience.

Once that was done, all I had to do was add a CNAME record with my domain name (mtldribbblemeetup.com) pointing to the Heroku URL (mtldribbblemeetup.herokuapp.com). Done!

The whole process took roughly 10 minutes and the site was already accessible at the custom domain name. Couldn’t recommend Cloudflare enough as a DNS provider for sites hosted on Heroku.