Note:If the download request is from a Tencent Cloud VPC (for example, using a CVM to access a COS bucket), we recommend you use the COS domain directly. If you use a custom CDN acceleration domain, you will need to access the CDN node over a public network, which incurs additional fees such as CDN origin-pull fees and CDN traffic fees.
For information on domain name definition, CDN origin-pull authentication, and CDN authentication configuration, see CDN Acceleration Overview.
CDN origin-pull authentication and CDN authentication configuration affect how custom CDN acceleration domain names and COS domain names access origin buckets. Please find the details in the table below.
Bucket access permission | CDN origin-pull authentication | CDN authentication | Origin can be accessed via custom CDN acceleration domain name | Origin can be accessed via COS endpoint | Scenarios |
---|---|---|---|---|---|
Public read | Disabled | Disabled | Yes | Yes | Site-wide public access |
Public read | Enabled | Disabled | Yes | Yes | Not recommended |
Public read | Disabled | Enabled | URL authentication is required | Yes | Not recommended |
Public read | Enabled | Enabled | URL authentication is required | Yes | Not recommended |
Private read + CDN service authorization | Enabled | Enabled | URL authentication required | COS authentication required | Full-linkage protection |
Private read + CDN service authorization | Disabled | Enabled | URL authentication is required | COS authentication is required | Not recommended |
Private read + CDN service authorization | Enabled | Disabled | Yes | COS authentication is required | Origin protection |
Private read + CDN service authorization | Disabled | Disabled | No | COS authentication is required | Not recommended |
Private read | Disabled | Enabled or disabled | No | COS authentication is required | CDN is unavailable |
Note:Origin protection is useful in cases where your data cached on CDN edge nodes may be maliciously pulled due to lack of CDN authentication. Therefore, we strongly recommend you enable CDN authentication to mitigate data security issues.
You can bind a custom domain name with a bucket in the COS console. After that, you can enable CDN acceleration for the custom domain name to speed up access to the bucket through the custom domain name. When binding a custom domain name with a bucket, you need to add a CNAME record to it at your domain name service provider.
Note:Currently, you must activate the CDN service to use a custom acceleration domain name in COS.
Note:You can add a custom domain name and enable CDN acceleration in both COS console and CDN console. For more information on how to do so in the CDN console, see Connecting Domain Names.
Log in to the COS console, click Bucket List on the left sidebar, and click the name of a bucket that you want to enable CDN acceleration.
Click Domains and Transfer > Custom CDN Acceleration Domain. Under the Custom CDN Acceleration Domain configuration item, click Add Domain.
www.example.com
). Make sure that an ICP filing has been obtained and a CNAME record has been configured at the DNS service provider for the entered domain. For more information, see CNAME Configuration. If the custom CDN acceleration domain you are connecting is in the following situations, you need to verify your domain ownership as instructed in Domain Name Ownership Verification.Note:
For private-read buckets, if both origin-pull authentication and CDN service authorization are enabled, signature is not required for accessing the origin via CDN, and cached resources in CDN will be distributed on the public network, which will affect the data security. Therefore, we recommend that you enable CDN authentication.
After enabling Origin-pull Authentication, click Save on the right. In about five minutes, the added custom domain name and CDN acceleration will be deployed.
Enabling CDN authentication
Note:
After CDN acceleration is enabled for the custom domain name, anyone can access the origin via the domain name. Therefore, if you need to keep you data private, be sure to protect your data in the origin by enabling CDN authentication.
After the custom domain name is deployed, a CDN authentication configuration link will appear in the CDN authentication column. Click Set to directly enter the CDN console for CDN authentication configuration. For detailed directions, see Authentication Configuration.
Automatic CDN Cache Purge: After this feature is enabled, when a file in the COS bucket is updated, the CDN cache will be automatically purged. You can go to the Function Service section in the COS console to configure this feature as instructed in Setting CDN Cache Purge.
HTTPS Certificate: To add an HTTPS certificate for the custom domain name, go to the CDN console.
After the custom domain name is added to the CDN, the system will automatically assign you a CNAME domain name suffixed with .cdn.dnsv1.com
. You need to complete the CNAME configuration at the domain name service provider. For more information, see CNAME Configuration.
Note:You will not be able to directly access the CNAME domain name.
After the above steps are completed, you can use the custom domain name to accelerate access to resources in the bucket. You can disable it in the following ways:
On the Custom CDN Acceleration Domain page, click Edit to change Status from online to offline, click Save, and wait for about 5 minutes for the deployment to complete. After that, the status of the custom acceleration domain name will be changed to Deactivated in the CDN console.
Note:You can delete a custom domain name only after changing its status to Offline. To disable or delete a CDN domain name, go to the CDN console. For more information, see Domain Name Operations.
Apakah halaman ini membantu?