Use Tencent Cloud Storage Bucket (COS) to Host Static Websites

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

  1. Register Tencent Cloud, log in to Bucket Service (COS), and create a new bucket
    insert image description here
    Note: Please set the access permission to [ public read private write ].

  2. Enter the storage bucket and turn on the switch of the static website (path: basic configuration > static website)
    insert image description here

  3. Upload the code for your website in the file list
    insert image description here

  4. Go to [Domain Name and Transfer Management > Custom CDN Accelerated Domain Name] and add a domain name.
    insert image description here
    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.
    insert image description here
    Add these contents to the corresponding domain name resolution records in DNSPOD or your domain name service provider.
    insert image description here
    After the verification is complete, set the acceleration region to global:
    insert image description here
    then enable CDN service authentication
    insert image description here

  5. Enter the Tencent CDN management page and configure the HTTPS certificate. Path: [Certificate Management > Certificate Configuration].

insert image description here
You can also set mandatory HTTPS access in CDN domain name management.

insert image description here

Visit your website now and try it out!

related documents

Guess you like

Origin blog.csdn.net/xovee/article/details/129909716