If the IP address of your origin server is associated with multiple domain names or sites, you can set the HOST header in HTTP requests to specify the site to which requests are redirected. DCDN redirects requests to the site specified by the HOST header.

Background information

Differences between an origin server and an origin host:
  • An origin server is where your workloads run. If you set the origin server as the destination for back-to-origin requests, the requests are redirected to the IP address of the origin server.
  • An origin host is the value of the HOST header in back-to-origin requests, and defines a specific site that is hosted on a specific IP address. Back-to-origin requests are redirected to the site.
Important
  • For a specific domain name, the origin host is the accelerated domain name by default.
  • For a wildcard domain name, the origin host is the domain name that matches the wildcard domain and is actually visited by users. For example, if the wildcard domain name is *.aliyundoc.com and the domain name that is visited by users is example.aliyundoc.com, the origin host is example.aliyundoc.com.

Procedure

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.
  4. In the left-side navigation pane of the domain name, click Origin Fetch.
  5. On the Origin Fetch tab, find the Origin Host section.
  6. Turn on Origin Host and set Domain Type.
    Origin Host
    ParameterDescription
    Domain Name to AccelerateThe accelerated domain name is used as the default origin host.
    Origin Domain NameThe domain name of the origin server is used as the default origin host.
    Note
    • If you set the type of the origin server to IP when you add an origin server, Origin Domain Name is dimmed.
    • If you set the type of the origin server to OSS Domain when you add an origin server, Default Origin Host is turned on and Domain Type is set to Origin Domain Name.
    Custom DomainThe domain name that you specified is used as the origin host.
  7. Click OK.

Configuration examples

Example 1: The address of the origin server is a domain name.
Domain nameDomain typeDescription

Accelerated domain name: image.example.com

Origin server address: example.com

Domain Name to Accelerateimage.example.com
Origin Domain Nameexample.com
Custom Domain (such as origin.example.com)origin.example.com
Example 2: The address of the origin server is an IP address.
Domain nameDomain typeDescription

Accelerated domain name: image.example.com

Origin server address: 10.10.10.10

Domain Name to Accelerateimage.example.com
Custom Domainorigin.example.com
Example 3: The address of the origin server is an OSS domain name.
Domain nameDomain typeDescription

Accelerated domain name: image.example.com

Origin server address: example.oss-cn-hangzhou.aliyuncs.com

Domain Name to Accelerateimage.example.com
Origin Domain Nameexample.oss-cn-hangzhou.aliyuncs.com
Custom Domain (such as origin.example.com)origin.example.com