We’ve got our app running on Heroku, which is great. As a brief aside, I’m going to show you how to get a real domain pointing to this site. You can skip this chapter if you like, but it takes a couple of hours for the domain name to become operational so you might want to do this sooner rather than later.

First, we’re going to buy a domain name with Namecheap, then we’re going to use a CNAME (Canonical Name) DNS (Domain Name System) record to make our new domain name an alias of our Heroku site.


Register on https://www.namecheap.com/ and search for a domain name, and add it to your cart. I’m going to buy memespace.xyz because it’s only a dollar. Complete the checkout process.

Picking A Domain Name

Once that’s complete, go back to the home page and navigate to your dashboard with the following menu option, and click manage on your new domain name.

Namecheap Dashboard

Manage New Domain Name

Now set up your DNS records to look like mine below. Use your own Heroku domain name, of course.

DNS Records


The last step is just to tell Heroku to allow this alias. Log in to Heroku in your browser, log in, and navigate to your app settings, which looks like this:

Heroku Settings

Scroll down to the Domains section and add entries resembling the following:

Heroku Domains

And that’s actually all completed. Your site still may not be working. It might look something like below, or it might still be redirecting you to a domain parking page.

Site can't be reachedThis is because of the way DNS works. You’ve updated the DNS records on Namecheap, but these changes need to propagate through DNS servers around the world, eventually reaching the one you’re connected to. This should only really take a few hours, but it could take a day or two.


One way to avoid waiting for DNS updates to propagate is to use a reverse proxy like Cloudflare. You still have to wait some time when you initially set it up for a site, but after that, all DNS changes you make through Cloudflare are instant. The reason is because all traffic is always redirected through Cloudflare, so only Cloudflare actually looks at your DNS settings.

That’s it for this brief chapter. In the next one, we’re going to add Facebook authentication.