简体   繁体   中英

Way to make https connect to www subdomain

I deploy my static website using aws cloudfront. (Because i want to connect through https)

I made s3 bucket(my_bucket) and certification and coudfront distribution using my_bucket

then, I made 'a' record pointing to cloudfront that i made before and succeeded to connect "https~mysite.com." url ("mysite.com" also connects to "https~mysite.com.")

and I made "www.mysite.com." 'cname' record pointing to "mysite.com." (Becasue i used this name when i made cloudfront distribution -> Alternate Domain Names(CNAMEs))

so i expect that using www.mysite.com url i can go "https~www.mysite.com." or https~mysite.com but it makes error

403 error The request could not be satisfied. at chrome and cannot connect secure connection at safari

i found aws docs seems like helps with my trouble but i couldn't fix my problem.

https://aws.amazon.com/premiumsupport/knowledge-center/resolve-cloudfront-bad-request-error/?nc1=h_ls

this is what i saw.

plz inform me how to fix this...

You need A record and not CNAME also for the www subdomain. Make it an ALIAS as you did with the apex domain (and if you want also add an AAAA record) and make sure that the www subdomain is also listed as an alternate name for the distribution. It should work this way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM