The company will host a static website for example.com and www.example.com using Amazon S3. How should you set up S3 to serve both the root domain and the www subdomain?
Choose an answer
Tap an option to check your answer.
Correct answer: Create two S3 buckets named example.com and www.example.com, and configure the www.example.com bucket to redirect requests to example.com..
Why this is the answer
To host a static website on Amazon S3 for both a root domain (example.com) and its www subdomain (www.example.com), you must create two separate S3 buckets. One bucket should be named exactly example.com and the other www.example.com. The bucket named www.example.com should then be configured to redirect all requests to the example.com bucket. This ensures that users accessing either URL are directed to the same content. S3 does not support wildcard bucket names for static website hosting, nor can a single bucket directly serve both the root and www domains without a redirect configuration.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed