具有自定义域的 herokudns:没有这样的应用程序 [英] herokudns with custom domain: No such app

查看:21
本文介绍了具有自定义域的 herokudns:没有这样的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已多次查看

这些是我的 DNS 记录:

当我访问 omaiga.com.sv 或 www.omaiga.com 时,Heroku 回应:没有这样的应用程序.这里还没有."我做错了什么?

一些细节:

  • 我可以使用 omaiga.herokuapp.com 而不是 protected-hookworm-0tshh2aii82icypukmovp7rz.herokudns.com 但我计划稍后实施 SSL,所以我需要让它工作使用 herokudns.
  • namecheap.com 建议 用户将 301 重定向从我的根域重定向到我的www",而不是使用 ALIAS 记录,以免影响电子邮件记录.

解决方案

我会回答我自己的问题:根据 Heroku 的文档 *.herokudns 地址不可浏览.相反,Heroku 使用来自客户端的Host"标头来确保正确的应用程序响应请求.

这里的问题是 Host 标头带有来自 Namecheap 的www"(因为我指定了我的规范名称 -CNAME-),但我没有将www"提供给 Heroku,因此解决方案是添加Heroku 中带有www"的自定义域.

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.

解决方案

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'.

这篇关于具有自定义域的 herokudns:没有这样的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆