ruby-on-rails - Heroku 自定义域 (Namecheap) 不起作用

标签 ruby-on-rails heroku dns namecheap custom-domain

这是我第一次处理自定义域。我在 Heroku 上托管了 Rails 应用程序。我在 Heroku 应用程序的设置中设置了自定义域: enter image description here 配置应用程序的 DNS 提供商 (Namecheap) 以指向 DNS 目标。已经联系了他们,他们说我将我的域名正确指向了 Heroku。 enter image description here 但我的域名“polina.io”仍然无法正常工作。我不明白为什么。

enter image description here

当我在终端中运行 $ dig CNAME www.polina.io 来检查更改时,一切看起来都很好:

; <<>> DiG 9.10.6 <<>> CNAME www.polina.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65173
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.polina.io.         IN  CNAME

;; ANSWER SECTION:
www.polina.io.      251 IN  CNAME   hidden-alligator-62pta0x140xhvkwsl9336sfc.herokudns.com.

;; Query time: 7 msec
;; SERVER: 115.178.58.10#53(115.178.58.10)
;; WHEN: Fri Feb 21 14:56:22 +07 2020
;; MSG SIZE  rcvd: 111

如果有任何帮助,我将不胜感激。

最佳答案

如果有人遇到同样的问题,也许会有帮助。

我解决了添加 SSL 证书的问题(不确定这是否重要),并且不仅添加 www.domainexample.com,还添加根域 (domainexample.com):

$ heroku domains:add polina.io
$ heroku domains:wait 'polina.io'

关于ruby-on-rails - Heroku 自定义域 (Namecheap) 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60334398/

相关文章:

ruby-on-rails - cucumber :WAITINGajax:成功

ruby-on-rails - 当用户是管理员时保存对象时的不同行为

ruby-on-rails - Rails assert_equal 并不总是适用于 DateTimes

ruby-on-rails - Hartl 的 Ruby on Rails/Hello_App/Heroku 错误 H10

node.js - 对于模型 ""的路径 "_id"处的值 "Coach",转换为 ObjectId 失败

mysql - habtm混淆..逻辑查询

ruby-on-rails - Heroku - 如何删除表并再次运行迁移?

c++ - c-ares 为 DNS 解析指定网络接口(interface)

ssl - 在 Google Cloud DNS 中添加 AAAA 记录

linux - CentOS 6.3 上 eth0 和 venet0 配置的区别