将裸域重定向到具有DNSimple的www [英] Redirecting naked domain to www with DNSimple
问题描述
我们正在使用DNS简单的方式将我们的域名指向支持SSL的Heroku应用。我们正在寻求的行为如下:
We're using DNS simple to point our domain to our SSL-enabled Heroku app. The behavior we're seeking is as follows:
http://我们的域名。 com
https://ourdomain.com
< a href =http://www.ourdomain.com =noreferrer> http://www.ourdomain.com
应该全部永久重定向到:
Should all permanently redirect to:
我们已经为www.ourdomain.com创建了一个指向我们应用程序的.herokussl.com域的CNAME,但是我们不知道该怎么做做裸体域。在GoDaddy中,我们曾经做非掩码转发。 DNSimple没有转发,但确实有特殊的条目叫做ALIAS和URL,尽管我们不知道该用什么。
We've already created a CNAME for www.ourdomain.com that points to our app's .herokussl.com domain, but we're not sure what to do with the naked domains. In GoDaddy, we used to do non-masked forwarding. DNSimple doesn't have forwarding, but does have special entries called ALIAS and URL, though we're not sure what to use.
推荐答案
p>要配置重定向,您应该使用我们的重定向文档中所述的URL记录。
To configure a redirect you should use an URL record as described in our redirect documentation.
但是,由于优先级,重定向HTTPS网址是不可能的SSL协商和HTTP头之间。在这种情况下,因为您还要 https://ourdomain.com
重定向到 https://www.ourdomain.com
,那么您需要将mydomain.com的ALIAS创建到您的Heroku SSL端点并处理您应用中的重定向。
However, it's not possible to redirect an HTTPS URL because of the priority between SSL negotiation and HTTP headers. In this case, because you also want https://ourdomain.com
to redirect to https://www.ourdomain.com
, then you need to create an ALIAS for ourdomain.com to your Heroku SSL endpoint and handle the redirect in your app.
这篇关于将裸域重定向到具有DNSimple的www的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!