0

I am trying to map my domain name to my heroku app. As it stands now only

www.mysite.com 

will work. I want to map it so

mysite.com will work

I am currently using free versions of Heroku and Zerigo and my domain is registered with Hostgator. I have followed all the directions on the heroku site, which have gotten me to the point where www.mysite.com maps to my app but what I want is for

mysite.com

to be mapped to my app. I'v seen the examples that speak of dnssimple etc. But can this be done with Zerigo and if so how. if you click the link from the heroku Custom Domain Names for Apps it takes you to a page with a list of definitions and not how to configure the root domain. I'd appreciate any help. or guidance. Also a lot of what I've been googling for help is 2-3 years older or more. I have just gotten my site live and am new to programming. Thanks

nothingness
  • 971
  • 3
  • 10
  • 18
  • This should normally be configured in Hostgator I believe. – Ryan Apr 12 '16 at 20:56
  • I've already configured name: www.mysite.com.; ttl 14400; class: IN; type: CNAME; record: mysite.herokuapp.com. what else needs to be changed @user3650429 ? – nothingness Apr 12 '16 at 21:09
  • You can check this link that shows you how to create the redirect: http://wphostingdiscount.com/how-to-use-301-domain-redirection-using-hostgator-cpanel/ – Ryan Apr 12 '16 at 21:15
  • @Ryan this worked. Is this a hack, workaround or proper procedure. I only ask because in the Heroku docs they made it seem like something else that had to be done. Either way thanks. If you copy and paste this into an answer I will give you credit. – nothingness Apr 12 '16 at 21:32
  • @ryan I spoke to soon it doesn't work when you try to go to other pages. i think it's causing an infinite loop – nothingness Apr 12 '16 at 21:34

1 Answers1

0

I actually did this a while back but ended transferring to DNSimple (for other reasons). The simplest explanation was actually posted a few hours ago in this thread:

According to https://devcenter.heroku.com/articles/custom-domains you must add a CNAME record like "CNAME www example.herokuapp.com" first at Hostgator. After that, you must add www.example.com (with or without www) as a custom domain to your project. It's really simple.

Source: How do I point my domain name from hostgator to heroku

Community
  • 1
  • 1
Hybrid
  • 6,741
  • 3
  • 25
  • 45
  • I did that. At hostgator i created a cname mysite.herokuapp.com and then I mapped my site to that. As I said it works if I do www.mysite.com but not mysite.com and if I run heroku host mysite.com it shows my registrars ip address so I know its making the connection – nothingness Apr 12 '16 at 21:45
  • Here's another thread that says it might be taking some time to propogate (fully apply - this happened to me before actually): http://stackoverflow.com/questions/5116052/how-could-i-redirect-a-root-level-domain-to-www-subdomain-with-zerigo-dns-on-her?rq=1 – Hybrid Apr 12 '16 at 21:46