Alibaba Cloud OSS provides transfer acceleration to accelerate the upload and download of OSS objects over the Internet. Transfer acceleration combines smart scheduling, protocol stack tuning, optimal route selection, and transfer algorithm optimization with OSS server-side configurations to provide an end-to-end acceleration solution. This topic describes how to implement OSS transfer acceleration based on a custom domain name.

Prerequisites

OSS transfer acceleration is enabled. For more information, see Configure transfer acceleration.

Background information

After transfer acceleration is enabled, an accelerate endpoint is generated for the bucket. The format of the accelerate endpoint is BucketName.oss-accelerate.aliyuncs.com. When you use this endpoint to access OSS, data transfers are accelerated. To implement transfer acceleration based on a custom domain name, bind the domain name to a bucket and configure the CNAME record to map the custom domain name to the accelerate endpoint.
Note Additional fees are charged based on the traffic and region where transfer acceleration is used. For more information, see Transfer acceleration.

Step 1: Bind a custom domain name

  1. Log on to the OSS console.
  2. Click Buckets, and then click the name of the target bucket.
  3. Choose Transmission > Domain Names.
  4. Click Bind Custom Domain Name. In the Bind Custom Domain Name dialog box that appears, set Custom Domain Name.
    Notice
    • Make sure that Add CNAME Record Automatically is turned off.
    • If a domain name conflict message appears, the domain name is already bound to another bucket. To resolve this issue, use either one of the following methods:
      • Use another domain name.
      • Verify the ownership of the domain name and forcibly bind the domain name to your bucket. This operation unbinds the domain name from the previous bucket. For more information, see Verify the ownership of a domain name.
  5. Click Submit.

Step 2: Configure the CNAME record

You must add a CNAME record to the DNS of your DNS provider. In this topic, Alibaba Cloud DNS is used as an example to describe the process of adding a CNAME record.

  1. Log on to the Alibaba Cloud DNS console.
  2. On the Manage DNS page that appears, click Configure in the Actions column corresponding to a domain name.
  3. On the DNS Settings tab that appears, click Add Record. In the Add Record dialog box that appears, configure parameters listed in the following table.
    Parameter Description
    Type Select the type of the record to direct requests.

    In this example, select CNAME.

    Host Enter the host record based on the prefix of the domain name. Examples:
    • If the domain name is www.aliyun.com, enter www.
    • If the domain name is aliyun.com, enter @.
    • If the domain name is abc.aliyun.com, enter abc.
    • If the domain name is a second-level domain name, such as a.aliyun.com or b.aliyun.com, enter an asterisk (*).
    ISP Line Select the ISP line used to resolve the domain name.

    We recommend that you select Default to allow the system to select the optimal line.

    Value Enter the value of the record based on the selected record type.

    Enter the OSS accelerate endpoint in the following format: BucketName.oss-accelerate.aliyuncs.com.

    TTL Select the update period of the record. In this example, select the default value.
  4. Click OK.
    Note A new CNAME record takes effect immediately. A modified CNAME record requires up to 72 hours to take effect.

Step 3: Verify whether the configuration takes effect

After a CNAME record is configured, the time period required for the record to take effect varies with different DNS providers. You can use the following methods to verify whether the configuration has taken effect:
  • In Windows:
    Open the cmd.exe program. Use the nslookup command to resolve your custom domain name. If the request is redirected to the accelerate endpoint, the CNAME has taken effect.
  • In Linux:
    Use the dig command to resolve your custom domain name. If the request is redirected to the accelerate endpoint, the CNAME has taken effect.