如何在AWS Route 53中重定向具有前缀www的域 [英] How to redirect domain with prefix www in AWS Route 53
问题描述
我需要从 xyz.com重定向
到 www.xyz.com
,所以我在Route 53上创建了一个托管区。我添加了一个A记录与我的ELB的地址,一个CNAME的名称为 www.xyz.com
和我的ELB地址的值。
但是这个设置不会将我的裸域重定向到我的 www
前缀域。我如何解决这个问题?
我已经使用了S3和CloudFront。 b
$ b
您需要两个小桶: www.yourdomainname.com
和 yourdomainname.com
。
将您的文件保存在 www
桶中。对于裸域桶属性,请转到静态网站托管部分,然后选择将所有请求重定向到其他主机名,然后输入 www.yourdomainname.com
。 / p>
I have a problem with domain hosting in Route 53.
I need to redirect from xyz.com
to www.xyz.com
, so I created a Hosted Zone on Route 53. I added an A record with the address of my ELB, and a CNAME with a name of www.xyz.com
and value of my ELB address.
But this set up does not redirect my naked domain to my www
prefixed domain. How do I solve this issue?
I've gotten this to work using both S3 and CloudFront.
You need two buckets: www.yourdomainname.com
and yourdomainname.com
.
Keep your files in the www
bucket. For the naked domain bucket properties, go to the "Static Website Hosting" section and select "redirect all requests to another host name", and enter www.yourdomainname.com
.
这篇关于如何在AWS Route 53中重定向具有前缀www的域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!