I have been going through Amazon's docs on using Route 53 in conjunction with S3 to serve static websites.
The strategy they show is to do:
example.com A -> alias to s3-website-eu-west-1.amazonaws.com (example.com bucket) www.example.com CNAME -> www.example.com.s3-website-eu-west-1.amazonaws.com
example.com bucket is set to host static content, and
www.example.com bucket is set to do a permanent redirect to
That's fine and it works, but because I am trying to learn and understand how DNS works in detail, I don't understand why they don't simply do:
example.com A -> alias to s3-website-eu-west-1.amazonaws.com (example.com bucket) www.example.com A -> alias to s3-website-eu-west-1.amazonaws.com (www.example.com bucket)
Wouldn't it help reduce one extra DNS resolution step (
A lookup for
Is there any benefit to using CNAME here, considering that Route 53 has the ability to alias directly to buckets?
To be clear, using CNAME works, but I am trying to academically understand why they don't suggest using an A alias.