[英]Heroku App with Namecheap Domain Not Working
I have tried everything that has already been suggested on this site and others.我已经尝试了本网站和其他网站上已经建议的所有内容。
website.info
to Heroku's "Domains and certificates".website.info
添加到 Heroku 的“域和证书”。website.info.herokudns.com
with the host www
.website.info.herokudns.com
,主机为www
。@
, http://www.website.info
.@
, http://www.website.info
。 Result:结果:
"No Such App" comes up for Heroku. Heroku 出现“No such App”。
The same thing as normal, except I added www.website.info
to Heroku and removed website.info
.与往常一样,除了我将
www.website.info
添加到 Heroku 并删除了website.info
。
"This site can't be reached. www.website.info
's server IP address could not be found." “无法访问此站点。无法找到
www.website.info
的服务器 IP 地址。”
Installing heroku cli to my Git Bash: npm install -g heroku-cli
将 heroku cli 安装到我的 Git Bash:
npm install -g heroku-cli
I try heroku domains:add website.info -a websiteapp
.我尝试
heroku domains:add website.info -a websiteapp
。
"Domain already added to this app." “域已添加到此应用程序。”
Tried accessing it.尝试访问它。 Same thing: "No Such App".
同样的事情:“没有这样的应用程序”。
Same thing as the normal way, just without the redirect.与正常方式相同,只是没有重定向。
"This website.info page can't be found" HTTP ERROR 404
“无法找到此 website.info 页面”
HTTP ERROR 404
I used to do this all the time when I was learning how to build web apps.当我学习如何构建 Web 应用程序时,我曾经一直这样做。 Worked flawlessly.
完美无缺地工作。 Did Heroku change something for free dynos?
Heroku 是否为免费 dynos 改变了一些东西? Do I need to run SSL or something?
我需要运行 SSL 吗?
At the very least, I can redirect the domain to the website.herokuapp.com
domain, but I would rather not do that.至少,我可以将域重定向到
website.herokuapp.com
域,但我宁愿不这样做。
I've just had the same issue and tried all the methods you have tried plus more.我刚刚遇到了同样的问题,并尝试了您尝试过的所有方法以及更多方法。 In the end how got my custom domain to work was to set my namecheap Domain settings to
Custom DNS
.最后如何让我的自定义域工作是将我的 namecheap Domain 设置设置为
Custom DNS
。
elle.ns.cloudflare.com
rudy.ns.cloudflare.com
From there i used the www.customdomain.com
format on heroku and set the rest up on Cloudflare
as follows:从那里,我在 heroku 上使用了
www.customdomain.com
格式,并在Cloudflare
上设置了其余格式,如下所示:
On the DNS Tab在 DNS 选项卡上
Type Name Content TTL Proxy status CNAME www myapp.herokuapp.com Auto Proxied
On the SSL/TLS Tab select Full
在 SSL/TLS 选项卡上选择
Full
On the Page Rules Tab在页面规则选项卡上
If the URL matches: customdomain.com/
Then the settings are: Forwarding URL 301 - Permanent Redirect /www.customdomain.com
After i applied those settings everything worked perfectly.在我应用这些设置后,一切都运行良好。 I hope this can help anyone facing this issue in the future.
我希望这可以帮助将来遇到此问题的任何人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.