alias - 将区域 Apex 域路由到 Amazon Cloudfront

标签 alias amazon-cloudfront cname dnsimple

要将区域顶点路由到 Cloudfront,我是否必须使用 Amazon 的“53”DNS 服务?

这是一个非常令人惊讶的限制。如果没有其他选择,我必须移动 DNS 服务并更改 SSL 证书。

例如:

dev.myapp.com ---- CNAME ----> s3 location // works great
stage.myapp.com -- CNAME ----> Cloudfront Location // works great
myapp.com -------- ALIAS ----> Cloudfront Location // Issa no worky so good

If you're using Amazon Route 53 as your DNS service, you can create an alias resource record set instead of a CNAME. With an alias resource record set, you don't pay for Route 53 queries. In addition, you can create an alias resource record set for a domain name at the zone apex (example.com) http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html

Cloudfront dist on top level domain

除了使用 Amazon 53 之外还有其他选择吗?

最佳答案

我从 DNSimple 的 Darrin 那里得到的有用建议是:

Hi,

The trouble with an ALIAS record and CDNs is it will resolve to an endpoint closest to our name servers rather than the normal behavior which is resolving to an endpoint closest to the client.

You might get a little better performance using our Anycast network since we our name servers are distributed closer to the client already. That said -- I would probably recommend against using an apex record with a CDN in any case.

If you're using a CDN I would probably use a URL redirect from the apex to the CNAME "www".

所以完整的设置是:

dev.myapp.com ---- CNAME ----> s3 location
stage.myapp.com -- CNAME ----> Cloudfront Location
www.myapp.com ---- CNAME ----> Cloudfront Location
myapp.com ----- REDIRECT ----> www.myapp.com

我担心性能影响,但我想我们可以衡量这些影响并使用react。

关于alias - 将区域 Apex 域路由到 Amazon Cloudfront,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18494077/

相关文章:

ruby-on-rails - Rails 3.1 Assets、Cache-Control、Max-Age 和 Expires header

dns - PowerDNS 和 CNAME 到外部域

c++ - 如何有效地将 float 别名为命名成员和数组元素?

bash - 防止 bash 别名在 shell 启动时评估语句

amazon-s3 - CloudFront - 来自自定义来源的私有(private)内容?

ruby-on-rails - 如何配置 Carrierwave 以使用多个 CDN CNAME url

php - 自定义 URL/域(CNAME 别名?)

php - 如何使用嵌套别名让查询更简单?

MySQL JSON_OBJECT + CONCAT & GROUP_CONCAT 作为别名 & 截断/最大长度