[英]Using PointDNS for non-www and handling SSL
I've been using Heroku to host my app (www.justbooked.com) and godaddy is where the domain is stored.我一直在使用 Heroku 来托管我的应用程序 (www.justbooked.com),godaddy 是存储域的地方。 For some reason, recently the non-www version eg justbooked.com is no longer working.
出于某种原因,最近非 www 版本(例如 justbooked.com)不再有效。
It seems like GoDaddy doesn't provide ANAME / ALIAS or other CNAME-style functionality for root-level domains (example.com). GoDaddy 似乎没有为根级域 (example.com) 提供 ANAME / ALIAS 或其他 CNAME 样式的功能。
I would like to know how I can get justbooked.com to work like www.justbooked.com.我想知道如何让 justbooked.com 像 www.justbooked.com 一样工作。 Is this possible with Godaddy in any other way?
Godaddy 是否可以通过其他方式实现这一点? Bare in mind, I have SSL certs etc...
请记住,我有 SSL 证书等...
If this is not possible with GoDaddy, then using something like PointDNS may work, but I'm still not sure how to configure PointDNS with my existing SSL cert.如果 GoDaddy 无法做到这一点,那么使用 PointDNS 之类的东西可能会起作用,但我仍然不确定如何使用我现有的 SSL 证书配置 PointDNS。
Any help here would be great, goal is to get justbooked.com (non-www) working!!!这里的任何帮助都会很棒,目标是让 justbooked.com(非 www)工作!!!
Thanks!谢谢!
I guess your problem might already be solved by now, but for the sake of helping people like you and me in the past (found this topic 4 weeks ago when I had the same problem), I'm writing a step-by-step tutorial on how to get PointDNS working for www and non-www domains on HTTPS.我想你的问题现在可能已经解决了,但为了帮助像你我这样的人过去(4周前我遇到同样的问题时发现了这个话题),我正在写一个循序渐进的关于如何让 PointDNS 在 HTTPS 上为 www 和非 www 域工作的教程。 Read all steps, including the notes, before starting.
在开始之前阅读所有步骤,包括注释。
heroku addons:create pointdns:developer
heroku addons:create pointdns:developer
heroku domains:add justbooked.com
and heroku domains:add www.justbooked.com
heroku domains:add justbooked.com
和heroku domains:add www.justbooked.com
.herokudns.com
)..herokudns.com
结尾的.herokudns.com
)。 You can check the DNS targets either by the Heroku's UI or by using the CLI command: heroku domains
heroku domains
--app
flag in the Heroku CLI commands.--app
标志。heroku addons:create ssl:endpoint
.heroku addons:create ssl:endpoint
。 After that, upload your certificate using the command: heroku certs:add server.crt server.key --type endpoint
.heroku certs:add server.crt server.key --type endpoint
。 In step 5 , instead of the heroku domains
command, use heroku certs
.heroku certs
代替heroku domains
命令。 Use the endpoint DNS target (the one ending in .ssl.herokudns.com
) in step 6 ..ssl.herokudns.com
结尾的.ssl.herokudns.com
)。config.force_ssl = true
in your config/environments/production.rb
or similar.config/environments/production.rb
或类似文件中使用config.force_ssl = true
。.herokuapp.com
link instead of the .herokudns.com
one as the DNS target in PointDNS..herokuapp.com
链接而不是.herokudns.com
作为.herokudns.com
中的 DNS 目标。 This might work for HTTP traffic, but your HTTPS sessions will fail..herokudns.com
even if you're only using HTTP (maybe you're using the free hosting plan), because it'll be easier to set up HTTPS later..herokudns.com
,因为稍后设置 HTTPS 会更容易。While pointing any website via pointdns you can use 2 ways , one is via cname and other is using service like pointDNS.通过pointdns指向任何网站时,您可以使用两种方式,一种是通过cname,另一种是使用pointDNS之类的服务。 If you want to run SSL specially on naked domain like justbooked.com in your case you need to you pointDNS here
如果您想在像 justbooked.com 这样的裸域上专门运行 SSL,您需要在此处指向 DNS
PointDNS configuration is quite easy as you just need to add dns records from godaddy to pointDNS PointDNS 配置非常简单,因为您只需要将来自godaddy 的 dns 记录添加到 pointDNS
For SSL , either you can use ACM or add your own certificate in heroku setting.ACM uses let's encrypt SSL which is free but doesnot allow wildcard SSL.对于 SSL ,您可以使用 ACM 或在 heroku 设置中添加您自己的证书。ACM 使用让我们加密 SSL,它是免费的,但不允许通配符 SSL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.