Static website hosting
Updated at:2025-11-03
Overview
BOS allows users to host static websites on their buckets, enabling streamlined website operation and maintenance. Once configured, users can access their hosted website by directly using the bucket's domain name.
A static website consists entirely of static resources, such as HTML and JPG files, without any server-side scripts like PHP, JSP, or ASP.NET. Additionally, statically hosted websites do not support server-side script execution.
If you need to deploy and manage dynamic websites, please use Baidu AI Cloud Compute BCC or Container Service CCE.
Usage method
You can set up static website hosting through the console, API, and SDK as follows:
- To set up static website hosting through the console, please refer to [Set Up Static Website Hosting](BOS/Console Operation Guide/Managing Bucket/Set static website hosting.md).
-
Set up static website hosting through the API:
- [PutBucketStaticWebsite API](BOS/API Reference/Bucket-Related Interface/Static Website/PutBucketStaticWebsite.md): Use the PutBucketStaticWebsite API to set up static website hosting.
- [GetBucketStaticWebsite API](BOS/API Reference/Bucket-Related Interface/Static Website/GetBucketStaticWebsite.md): Use the GetBucketStaticWebsite API to get static website hosting information of bucket.
- [DeleteBucketStaticWebsite API](BOS/API Reference/Bucket-Related Interface/Static Website/DeleteBucketStaticWebsite.md): Use the DeleteBucketStaticWebsite API to delete the static website hosting information set for the bucket and disable static website hosting for this bucket.
-
Use static website hosting through the SDK:
- [JAVA SDK](BOS/SDK/Java-SDK/Bucket management.md#Bucket static website hosting)
- [PHP SDK](BOS/SDK/PHP-SDK/Bucket management.md#Bucket static website hosting)
