How to point wildcard domain (*.example.com) to s3 buckets with cloudfront/route53

坚强是说给别人听的谎言 提交于 2019-12-24 20:17:03

问题


I have SSL Certified and setup a homepage for my site: example.com and www.example.com using Cloudfront, Route 53, and an s3 bucket. The site is just a basic static site.

I am trying to setup my Cloudfront/Route 53 to allow for WildCard subomdains so I can create some landing pages eg, industry-a.example.com, industry-z.example.com and have them point to separate static s3 buckets.

I have tried adding in *.example.com to my Cloudfront and Route 53

I have a hosted zone created for a domain from namecheap in Route 53 with the following records:

Type        Name                Target
A Record     -> example.com     -> My.cloudfront.net
A Record     -> www.example.com -> My.cloudfront.net
CNAME Record -> *.example.com   -> s3-website.us-east-2.amazonaws.com.

In my CloudFront distribution configuration:

Alternate domains set to:

example.com
www.example.com
*.example.com

Domain Name:

My.cloudfront.net

Origin ID:

example.com.s3-website.us-east-2.amazonaws.com

来源:https://stackoverflow.com/questions/55564199/how-to-point-wildcard-domain-example-com-to-s3-buckets-with-cloudfront-route

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!