Static Website Hosting enables the hosting of static content, including HTML, CSS, JavaScript, and images, directly, eliminating the need for an external web server. You can specify both an index page and an error page. Additionally, there is an option to link a custom domain.
Note: Static Website Hosting setting is supported for both contract-owned buckets and user-owned buckets. For more information, see Bucket Types.
Depending on the region of your Object Storage bucket, the static website URL varies. For more information on the static website endpoint, see Endpoints.
Static Content Hosting: Directly serve HTML, CSS, JavaScript, and media files statically on a website.
Publish Landing Pages: Host promotional or event-specific landing pages with high availability.
Documentation Sites: Host product documentation or manuals with easy access to the users.
You can manage Versioning using the DCD, API, and CLI.
Note: Static Website Hosting is disabled by default for a bucket. Enabling this setting will make all objects in the bucket publicly readable.
1. In the DCD, go to Menu > Storage > IONOS Object Storage.
2. From the drop-down list in the Buckets tab, choose either Show user-owned buckets or Show contract-owned buckets depending on the bucket type you want to view.
3. From the Buckets list, choose the bucket for which you want to manage Static Website Hosting.
4. Click Bucket settings and go to the Static Website Hosting setting under the Public access section.
5. Click Edit and add the following details:
Index document: Enter the file name that serves as an index document. Example: index.html
. An index document is a default webpage that IONOS Object Storage returns upon receiving a request to the root of a website or a subfolder.
Error document: Enter the file name of the HTML error document that is uploaded to the Object Storage bucket. An error document is a default HTML file with details you want the user to view when an error occurs.
6. Click Enable.
Result: Static Website Hosting is successfully enabled for a bucket.
Info: In the Static Website Hosting setting, choose Edit and click Disable to remove Static Website Hosting for a bucket.
Use the API to configure and manage Static Website Hosting for a bucket.
Use the CLI to manage Static Website Hosting.
Static Website Hosting is unsuitable for hosting websites that require server-side processing, such as PHP and Python.