herokudns with custom domain: No such app

喜夏-厌秋 提交于 2019-12-10 17:04:09

问题


I've reviewed Heroku's custom domain tutorial several times but I can't seem to make my Heroku app work with a custom domain (hosted on namecheap.com). The problem: Herokudns doesn't resolve the app name

This is my configuration at Heroku:

And these are my DNS records:

When I go to either omaiga.com.sv or www.omaiga.com Heroku responds: "No such app. There's nothing here, yet." What am I doing wrong?

Some details:

  • I could use omaiga.herokuapp.com instead of protected-hookworm-0tshh2aii82icypukmovp7rz.herokudns.com but I plan to implement SSL later so I need to make it work with herokudns.
  • namecheap.com recommends to user a 301 redirect from my root domain to my 'www' instead of using an ALIAS record in order not to affect the email records.

回答1:


I'll answer my own question: according to Heroku's documentation the *.herokudns addresses are not browsable. Instead, Heroku uses the 'Host' header from the client to ensure the correct application responds to a request.

The problem here was that the Host header is coming with 'www' from Namecheap (since I made that my canonical name -CNAME-) but I didn't give the 'www' to Heroku so the solution is to add the custom domain in Heroku with 'www'.



来源:https://stackoverflow.com/questions/53026340/herokudns-with-custom-domain-no-such-app

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