Ensure that website index (main) page suffix and error (404 not found) page are defined for your Google Cloud storage buckets with static website configuration. When you specify the main page suffix, if the suffix is set as "index.html," example.com will serve visitors the content from the object example.com/index.html if it exists. Additionally, if you specify an error (404 not found) page, if a user visits example.com/directory and neither that URL nor example.com/directory/index.html points to an object, the error page will be served.
This rule can help you with the following compliance standards:
- NIST5
For further details on compliance standards supported by Conformity, see here.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
Configuring the "website.mainPageSuffix" and "website.notFoundPage" properties for your static website hosted on a storage bucket in Google Cloud is vital for ensuring the desired behavior and optimal user experience. By setting these properties, you enhance the user-friendliness of your website and minimize the occurrence of errors or bounce rates. This configuration plays a key role in ensuring that your website behaves as expected, providing a seamless browsing experience for your visitors.
Audit
To determine if the static website configuration for your Google Cloud storage bucket includes the website index page suffix and error page, perform the following actions:
Remediation / Resolution
To define the index (main) page suffix and error (404 not found) page for your bucket website configuration, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Host a static website
- Static website examples and tips
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- ls - List providers, buckets, or objects
- web - Set a website configuration for a bucket
Unlock the Remediation Steps
Free 30-day Trial
Automatically audit your configurations with Conformity
and gain access to our cloud security platform.
You are auditing:
Define index page suffix and error page for the bucket website configuration
Risk Level: High