Object Storage Service (OSS) uses data centers that are distributed around the globe to perform transfer acceleration. When a request to access your bucket is sent, the request is parsed and routed to the data center where the bucket is located over the optimal network path and protocol. The transfer acceleration feature provides an optimized end-to-end acceleration solution for access to OSS over the Internet. This topic describes how to use transfer acceleration based on a custom domain name.
Transfer acceleration is enabled. For more information, see Enable transfer acceleration.
An ICP filing is obtained from the Ministry of Industry and Information Technology (MIIT) for the domain name that you want to map to your bucket if the bucket is located in the Chinese mainland. For more information, see ICP filing.
After transfer acceleration is enabled for a bucket, two acceleration endpoints are generated for the bucket.
Global acceleration endpoint: The format is
BucketName.oss-accelerate.aliyuncs.com. Global acceleration endpoints are distributed across the world. You can use a global acceleration endpoint to accelerate data transfer for buckets in all regions.
Acceleration endpoint outside the Chinese mainland: The format is BucketName.oss-accelerate-overseas.aliyuncs.com. Acceleration endpoints are distributed across regions outside the Chinese mainland. Users outside the Chinese mainland can use the acceleration endpoints to accelerate access to buckets in regions outside the Chinese mainland.
You are charged additional fees based on the traffic and region where transfer acceleration is used. For more information, see Transfer acceleration fees.
If you want to accelerate access to a bucket by using a custom domain name, you must map the custom domain name to the bucket and add a CNAME record that points to the acceleration endpoint.
Use the OSS console
Map a custom domain name to the bucket.
Log on to the OSS console.
In the left-side navigation pane, click Buckets. On the Buckets page, find and click the desired bucket.
In the left-side navigation pane, choose Bucket Settings > Domain Name Management.
On the Domain Management page, click Map Custom Domain Name.
In the Map Custom Domain Name panel, enter the domain name that you want to map in the Domain Name field.Important
Do not turn on Add CNAME Record Automatically.
If a message that indicates a domain name conflict appears, the domain name is mapped to another bucket. To resolve this issue, you can map another domain name to the bucket. You can also verify the ownership of the domain name to forcibly map the domain name to the bucket. This operation removes the mapping between the domain name and the previous bucket. For more information, see Map custom domain names.
Add a CNAME record.
Add a CNAME record in the system of your Domain Name System (DNS) provider. The following steps show how to add a CNAME record for a domain name that is hosted on Alibaba Cloud:
Log on to the Alibaba Cloud DNS console.
In the left-side navigation pane, click Domain Name Resolution. On the Domain Name Resolution page, find the domain name and click DNS Settings in the Actions column.
On the DNS Settings page, click Add DNS Record. In the Add DNS Record panel, configure the parameters. The following table describes the parameters.
The type of the record that you want to add. Select CNAME from the Record Type drop-down list.
The host record based on the prefix of the domain name.
To add a root domain, such as
aliyun.com, enter @.
To add a subdomain name, enter the prefix of the subdomain name. For example, if the domain name is
help.aliyun.com, enter help.
To map all subdomain names to the public endpoint of the bucket, enter *.
DNS Request Source
The DNS line that is used to resolve the domain name. To allow the system to select the optimal line, we recommend that you select Default for this parameter.
The OSS acceleration endpoint. Enter the global acceleration endpoint or acceleration endpoint for regions outside the Chinese mainland based on your business requirements. For more information about transfer acceleration endpoints, see Regions and endpoints.
The update interval of the record. In this example, use the default value.
Check whether the CNAME record takes effect
The time period required for the CNAME record to take effect varies based on the DNS providers. You can use the following methods to check whether the CNAME record takes effect:
Open the cmd.exe program. Run the nslookup command to resolve your custom domain name. If the request is redirected to the acceleration endpoint, the domain name mapping is in effect.
Run the dig command to resolve your custom domain name. If the request is redirected to the acceleration endpoint, the domain name mapping is in effect.