How to redirect a root (naked) domain to www - heroku and zerigo

喜夏-厌秋 提交于 2019-12-14 03:52:34

问题


I have a domain example.com and www.example.com. I'm using Heroku and Zerigo for DNS.. Right now I have a forwarding from the root domain to the www.example.com from my Hostgator account but that's not working. I'd prefer to use Zerigo with the redirecting or by using an ALIAS. A lot of the articles I've found talk about ALIAS and ANAMES but I can't find those on Zerigo unless an ALIAS is specified by the letter A.

Does anyone have a solution to pointing naked domains to their www using Zerigo??

I have done this already -

  1. Went to Zerigo dashboard
  2. Clicked Add Snippet
  3. Click Heroku
  4. Add both of those
  5. Change the CNAME to my heroku app name

It seems like this makes it work temporarily only.


回答1:


Heroku support didn't even give me a great answer at all...

Looks like one short-term solution would be to point an A-record to 174.129.25.170

If you go to http://wwwizer.com/naked-domain-redirect they free-of-charge redirect naked domains to full domains if you point the record to that address. Also, instead of using Zerigo I did this on my domain registrar's website. But using Zerigo should work as well.

Hope this helps anyone who has this trouble in the future. Remember, this isn't the best solution but it does work. If anyone has a better answer please let us know for future reference.

EDIT on April 10, 2014

The best solution is to buy an SSL certificate for your website. With Heroku, you can use their SSL Endpoint add-on which requires you to buy a certificate elsewhere. This isn't the easiest process, but will work 100% of the time.

Happy coding



来源:https://stackoverflow.com/questions/19529596/how-to-redirect-a-root-naked-domain-to-www-heroku-and-zerigo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!