Heroku gave you a domain, but it's long, hard to remember, and ugly. It'd be awesome to have a domain name that is short and easy to remember, right?
In this chapter we will teach you how to buy a domain and direct it to Heroku!
A typical domain costs around $15 a year. There are cheaper and more expensive options, depending on the provider. There are a lot of companies that you can buy a domain from: a simple google search give hundreds of options.
Our favourite one is I want my name. They advertise as "painless domain management" and it really is painless.
Go to iwantmyname and type a domain you want to have in the search box.
You should now see a list of all available domains with the term you put in the search box. As you can see, a smiley face indicate that the domain is available for you to buy, and a sad face that it is already taken.
We've decided to buy djangogirls.in
:
Go to checkout. You should now sign up for iwantmyname if you don't have an account yet. After that, provide your credit card info and buy a domain!
After that, click Domains
in the menu and choose your newly purchased domain. Then locate and click on the manage DNS records
link:
Now you need to locate this form:
And fill it in with the following details:
Click the Add button and Save changes at the bottom.
It can take up to a couple of hours for your domain to start working, so be patient!
You also need to tell Heroku that you want to use your custom domain.
Go to the Heroku Dashboard, login to your Heroku account and choose your app. Then go into app Settings and add your domain in the Domains
section and save your changes.
That's it!