本文介绍了Cloudfront CNAME与DNS CNAME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

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

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.

我不明白为什么我想这样做。为什么我不直接在站点的DNS记录中创建CNAME并将其直接指向d27fwrff25jcfdafa.cloudfront.net,而不是在Cloudfront中创建CNAME?这是我所做的,并且可以正常运行,但是我不喜欢不了解内容。

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.

或者,如果我仅使用管理控制台创建了CNAME,则不会然后,我需要将我的名称服务器设置为Amazon,以便可以正确解析CNAME?我在文档中找不到该步骤的任何提述,所以我想我肯定有什么不足!

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!

感谢您的帮助,Paul

Thanks for any help,Paul.

推荐答案

您在第二段中描述的过程完全正确。您使用DNS提供商在您的域中创建CNAME记录。然后,您将有关CNAME的信息告知CloudFront,以便当HTTP Host标头中的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.

希望这会有所帮助!

这篇关于Cloudfront CNAME与DNS CNAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 02:53