
Answer-first summary for fast verification
Answer: Remove the current bucket, create a new one named 'www.example.com', and upload the HTML/CSS files again.
The correct solution is to create a bucket whose name matches the CNAME record for your domain. For instance, if your CNAME record points http://www.example.com to c.storage.googleapis.com, the bucket should be named 'www.example.com'. This is because CNAME records cannot include paths, making options involving path modifications incorrect. Additionally, A records require IP addresses, not hostnames, and there's no concept of a 'Cloud Storage static website server' to restart. The infrastructure for static websites is fully managed by Google Cloud Platform. Therefore, the only viable option is to ensure the bucket name aligns with the domain name specified in the CNAME record.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You aim to host a static website on http://www.example.com using Google Cloud Storage for your staff. After creating a bucket named 'example-static-website', uploading 'index.html' and CSS files, and enabling static website hosting, you set up a CNAME record on http://www.example.com to point to c.storage.googleapis.com. However, accessing the website via http://www.example.com does not display the index page. What is the correct action to resolve this issue?
A
Delete the existing CNAME record in the example.com zone and replace it with an A record pointing to c.storage.googleapis.com.
B
Modify the CNAME record in the example.com zone to c.storage.googleapis.com/example-static-website.
C
Restart the Cloud Storage static website server to reload the objects.
D
Remove the current bucket, create a new one named 'www.example.com', and upload the HTML/CSS files again.