Heroku Godaddy naked domain [closed]

限于喜欢 提交于 2019-12-20 10:26:51

问题


I have a Heroku app and I've add a CNAME (www to herokuapp) to redirect it from GoDaddy to Heroku. Now I'm trying to manage also the naked domain.

This is from Heroku documentation.

Naked domains (also known as bare domains or apex domains, for example mydomain.com) must use DNS A-records. To setup your root domain, add separate A records for each of the following addresses using your DNS management tool:

75.101.163.44
75.101.145.87
174.129.212.2

Check that your DNS is configured correctly with the “host” command:

$ host example.com
example.com has address 75.101.163.44
example.com has address 75.101.145.87
example.com has address 174.129.212.2

I've also activated the forwarding from the GoDaddy main menu.

Ok, if I try host example.com with my domain, all is ok. But, when I try with the browser, I get this:

Heroku | No such app There is no app configured at that hostname. Perhaps the app owner has renamed it, or you mistyped the URL

I tried also with the command heroku domains:add yourdomain.com but this create a second instance of my app, it doesn't redirect it to the full domain www


回答1:


Heroku highly advises against using A-records to point domains at cloud apps. Using A-records increases the chance of instability for DNS resolution. Heroku goes into details here.

Instead, you should redirect your naked domain to the 'www' subdomain. You can refer to this SO thread for more details on how to set that up on GoDaddy.



来源:https://stackoverflow.com/questions/13478008/heroku-godaddy-naked-domain

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