Saturday, October 11, 2014

Custom Domain for your heroku Rails app

I recently purchased a domain name from Name.com, and needed to have it point to my Rails Heroku app (url : myherokuapp.herokuapp.com )

1- I attached my custom domain to my app
 $ heroku domains:add www.mydomain.com
2- I went to Name.com, logged into my account and accessed the Edit DNS records section.

3- There I added a CNAME record to my DNS record as shown below. ( Do not forget the . (dot) at the end of the url to your heroku app. The CNAME change would not work until I added it )


4- Opened my web browser, typed in www.nameofmydomain.com and was redirected to my heroku app.

It is as simple as that :)

For more info about adding custom domains for your heroku app refer to : https://devcenter.heroku.com/articles/custom-domains

No comments:

Post a Comment