We mentioned in Binding Custom Domain Names that the OSS allows you to direct your domain name to the OSS service address. In this way, the OSS bucket is accessed when you access your website. You need to specify the names of the objects in the bucket corresponding to the homepage (index) and error page (error) of the website respectively.
For more information about static website hosting, refer to OSS Static Website Hosting.
You can use ‘OSSClient.setBucketWebsite’ to set website hosting:
SetBucketWebsiteRequest request = new SetBucketWebsiteRequest("bucketName");
You can use ‘OSSClient.getBucketWebsite’ to view website hosting:
BucketWebsiteResult result = ossClient.getBucketWebsite("bucketName");
You can use ‘OSSClient.deleteBucketWebsite’ to clear website hosting: