Configure the default origin host

更新时间:
复制 MD 格式

If a single IP address on your origin server hosts multiple domain names or sites, you can configure the Host header for back-to-origin requests. This header specifies the exact site from which DCDN nodes retrieve resources.

Background information

Difference between origin server and origin host:

  • Origin server: Your business server. It specifies the IP address that DCDN nodes connect to during back-to-origin requests.

  • Origin host: The value of the Host field in the back-to-origin HTTP request header. It specifies which site on the destination IP address to access.

Important
  • For an exact domain name, the origin host defaults to the accelerated domain name.

  • For a wildcard domain name, the origin host defaults to the accessed subdomain. For example, if your wildcard domain name is *.aliyundoc.com and a user accesses 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 target domain name and click Configure in the Actions column.

  4. In the left-side navigation tree of the domain name, click Origin Fetch.

  5. On the Origin Fetch tab, find the Origin Host section.

  6. Turn on the Origin Host switch and select a Domain Type.

    回源host

    Parameter

    Description

    Domain Name to Accelerate

    Uses the accelerated domain name as the default origin host.

    Origin Domain Name

    Uses the origin server domain name as the origin host.

    Note
    • If the origin server address is an IP address, the Origin Domain Name option is disabled.

    • If the origin server address is an OSS domain name, the Origin Host feature is automatically enabled, and the Domain Type is set to Origin Domain Name.

    Custom Domain

    Uses a user-specified domain name as the origin host.

  7. Click OK.

Configuration examples

Example 1: The origin server address is a domain name.

Domain info

Domain type

Description

Accelerated domain name: image.example.com

Origin server address: example.com

Domain Name to Accelerate

image.example.com

Origin Domain Name

example.com

Custom Domain (for example, origin.example.com)

origin.example.com

Example 2: The origin server address is an IP address.

Domain info

Domain type

Description

Accelerated domain name: image.example.com

Origin server address: 10.10.10.10

Domain Name to Accelerate

image.example.com

Custom Domain

origin.example.com

Example 3: The origin server address is an OSS domain name.

Domain info

Domain type

Description

Accelerated domain name: image.example.com

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

Domain Name to Accelerate

image.example.com

Origin Domain Name

example.oss-cn-hangzhou.aliyuncs.com

Custom Domain (for example, origin.example.com)

origin.example.com