Cloudfront CNAME 与 DNS CNAME

发布于 2024-10-07 19:15:34 字数 426 浏览 0 评论 0原文

我已经设置了一个发行版,但我对可以在 Cloudfront 中设置的 CNAME 的用途有点困惑。假设我分配的 Cloudfront 域是 d27fwrff25jcfdafa.cloudfront.net,我可以使用 AWS 管理控制台分配“不错的”CNAME static.example.com。

我不明白为什么我想这样做。为什么我不直接在站点 DNS 记录中创建 CNAME 并将其直接指向 d27fwrff25jcfdafa.cloudfront.net,而不是在 Cloudfront 中创建 CNAME?这就是我所做的,而且效果很好,但我不喜欢不理解东西。

或者,如果我只使用管理控制台创建 CNAME,那么我是否需要将我的名称服务器设置为 Amazon,以便可以正确解析 CNAME?我在文档中找不到任何提及该步骤的信息,所以我想我一定遗漏了一些东西!

感谢您的帮助, 保罗.

I've set up a distribution but I'm a bit confused about the purpose of the CNAME that can be set up in Cloudfront. Assuming my assigned Cloudfront domain is d27fwrff25jcfdafa.cloudfront.net I can assign the "nice" CNAME static.example.com using the AWS Management Console.

I don't understand why I'd want to do this though. Why wouldn't I just create the CNAME in my sites DNS records and point it directly at d27fwrff25jcfdafa.cloudfront.net instead of creating the CNAME in Cloudfront? This is what I've done and it works perfectly but I don't like not understanding stuff.

Alternatively if I only created the CNAME using the Management Console wouldn't I then need to set my nameservers to Amazons so the CNAME can be resolved correctly? I can't find any mention of that step in the documentation so I guess I must be missing something!

Thanks for any help,
Paul.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陪你到最终 2024-10-14 19:15:34

您在第二段中描述的过程是完全正确的。您可以使用 DNS 提供商在您的域中创建 CNAME 记录。然后,您向 CloudFront 告知 CNAME,以便当请求在 HTTP 主机标头中包含您的 CNAME 时,它知道使用您的分配。

希望这有帮助!

The process you describe in your second paragraph is exactly right. You create the CNAME record in your domain using your DNS provider. You then tell CloudFront about the CNAME so it knows to use your distribution when requests come in with your CNAME in the HTTP Host header.

Hope this helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文