具有自定义域的herokudns:没有此类应用 [英] herokudns with custom domain: No such app

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

问题描述

我已经多次审查 Heroku的自定义域教程但我似乎无法使我的Heroku应用程序与自定义域(托管在namecheap.com上)一起使用.问题:Herokudns无法解析应用名称

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

这是我在Heroku上的配置:

This is my configuration at Heroku:

这些是我的DNS记录:

And these are my DNS records:

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

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?

一些细节:

  • 我可以使用 omaiga.herokuapp.com 代替 protected-hookworm-0tshh2aii82icypukmovp7rz.herokudns.com ,但我计划稍后实施SSL,因此我需要使其生效与herokudns.
  • namecheap.com
  • 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.

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

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天全站免登陆