Tuesday, November 13, 2012

Configure a GoDaddy domain with Heroku

Since this is the second time I've done this in a month I thought I'd write a post about it. I recently created a Rails site on Heroku where people can search for online professional development courses called reviewpd.com. After much deliberation with my partner we decided to rename the site to onlinepdreviews.com. This is how I switched the domain.

First I simply bought another domain from GoDaddy. They might not be the cheapest but I find them pretty easy to work with.

Then you configure your Heroku application to add the new domain:


$ heroku domains:add www.onlinepdreviews.com
Adding www.onlinepdreviews.com to onlinepdreviews... done
Then you configure your GoDaddy domain to point to your Heroku app. Open your GoDaddy account and Launch the domain you want to edit.



Click Launch under DNS Manager. Under the CNAME section you'll already see a 'www' entry. Edit this and change it to onlinepdreviews.herokuapp.com.




Heroku has more information.

You'll also want to configure the naked domain (http://onlinepdreviews.com) to point to your CNAME domain (www.onlinepdreviews.com). To do this go back to the Domain Details page of the domain you are editing. (Sometimes it helps to sort of start over in GoDaddy by clicking My Account in the top right, then Domains, then Launch next to the domain you want). On the left side under Domain Information click Manage next to Forwarding.



Simply type in the CNAME subdomain such as http://www.onlinepdreviews.com. If you refresh the page you'll see Forwarding is now On and should list your subdomain.



No comments:

Post a Comment