Challenge your knowledge of static website hosting with object storage and content delivery networks, covering website deployment, security, caching strategies, and error handling. This quiz helps reinforce best practices and key concepts for efficiently serving static websites on scalable platforms.
When enabling static website hosting for an object storage bucket, which setting must be configured to define the main page of your site?
Explanation: Index document is the setting that specifies the main file to load, typically index.html, when users access your website. Access control lists are for managing permissions but do not define landing pages. Origin access identities relate to content delivery network access control, not the website's entry point. Cache policies manage how assets are cached and are unrelated to the website's main page.
Which configuration ensures that your static website is accessible to all users over the internet?
Explanation: A bucket policy allowing public read gives all users access to the website's files, making your site public. Versioning controls object versions, not public accessibility. Enabling MFA delete is for security and does not influence website availability. Signed URLs restrict access to specific users and are typically used for private content, not public sites.
What is the primary benefit of connecting your static site bucket to a content delivery network (CDN)?
Explanation: A CDN caches your static content at multiple locations, leading to fast global delivery by serving users from the nearest edge location. Automatic backups are a storage function, not a CDN feature. Server-side scripting is not supported in static hosting. Object versioning is a separate storage feature and is not replaced by using a CDN.
If your static site needs to load resources like fonts or images from your bucket via client-side scripts, which configuration is essential to allow this?
Explanation: Cross-Origin Resource Sharing (CORS) must be enabled and configured for browsers to allow cross-origin resource access, such as fetching fonts or images. Edge location replicas are part of content delivery network operations. Origin failover handles availability and does not regulate browser security. Object lock is used for legal holds and retention, unrelated to resource sharing.
To show a user-friendly 404 page instead of a generic error when a file is not found on your static site, which feature should you configure?
Explanation: Custom error responses allow you to define error pages, such as a custom 404.html, enhancing user experience when resources are missing. Monitoring metrics provide performance or usage statistics, not error customization. Access logs contain records about requests, not user-facing error displays. Lifecycle policies manage object retention, not error handling.
What setting is typically used to prevent users from accessing static website files directly from the bucket URL, requiring all access to pass through the CDN?
Explanation: Blocking public access combined with an origin access identity restricts users from bypassing the CDN and ensures all file requests go through controlled distribution. Enabling website hosting serves the files but does not block direct access. Multipart uploads handle large file uploads but are unrelated to access controls. Default encryption secures data but does not restrict public access.
If you update an image on your static site but users still see the old version, which CDN configuration is likely causing this?
Explanation: A high TTL (time to live) cache setting tells the CDN to keep old copies of content longer, causing users to see outdated resources after updates. Disabled static hosting would prevent the site from serving at all, not just old files. Transfer acceleration relates to upload speed. MFA delete is a security feature, not a caching parameter.
How can you automatically redirect users from /old-page.html to /new-page.html on your static website?
Explanation: Redirect rules within static website hosting let you automatically forward users from one path to another. Server-side scripts cannot be run in static hosting environments. Storage transfer jobs are used for object migration, not user navigation. Versioning and replication handle copies and versions, not redirects.
To enhance security for your static website, which HTTP response header should be added to prevent your site from being embedded in frames on other domains?
Explanation: X-Frame-Options is used to control whether your website can be embedded in frames, helping prevent clickjacking attacks. Content-Encoding specifies compression methods and does not offer frame protection. Accept-Language is for language preference and unrelated to security. Cache-Control directs caching behaviors, not frame usage.
After updating several files on your static website, which action ensures that users receive the latest versions from the CDN immediately?
Explanation: An invalidation request tells the CDN to remove cached files, so users get updated versions immediately. Enabling multipart upload helps with uploading, not cache refresh. Turning off static hosting disables your website entirely. Increasing object retention relates to data deletion, not content updating.