Use Tencent Cloud Storage Bucket (COS) to Host Static Websites
This article describes how to use a storage bucket (COS) in Tencent Cloud Service to host a static website. This static website can be used to display information such as personal websites, and uses Tencent Cloud Content Distribution Network (CDN) to speed up access to the website for users around the world.
Create a Tencent Cloud storage bucket
-
Register Tencent Cloud, log in to Bucket Service (COS), and create a new bucket
Note: Please set the access permission to [ public read private write ]. -
Enter the storage bucket and turn on the switch of the static website (path: basic configuration > static website)
-
Upload the code for your website in the file list
-
Go to [Domain Name and Transfer Management > Custom CDN Accelerated Domain Name] and add a domain name.
In this step, please enter your domain name management website, such as DNSPOD, and add the records prompted to the resolution records to verify the ownership of the domain name. First, Tencent Cloud will give a resolution record, including the host record, record type, and record value.
Add these contents to the corresponding domain name resolution records in DNSPOD or your domain name service provider.
After the verification is complete, set the acceleration region to global:
then enable CDN service authentication
-
Enter the Tencent CDN management page and configure the HTTPS certificate. Path: [Certificate Management > Certificate Configuration].
You can also set mandatory HTTPS access in CDN domain name management.
Visit your website now and try it out!