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
- Log on to the DCDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.
- In the left-side navigation pane of the domain name, click Origin Fetch.
- On the Origin Fetch tab, find the Origin Host section.
- Turn on Origin Host and set Domain Type.
Parameter Description Domain Name to Accelerate The accelerated domain name is used as the default origin host. Origin Domain Name The 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 Domain The domain name that you specified is used as the origin host. - Click OK.
Configuration examples
Example 1: The address of the origin server is a domain name.
Domain name | Domain type | Description |
---|---|---|
Accelerated domain name: Origin server address: | Domain Name to Accelerate | image.example.com |
Origin Domain Name | example.com | |
Custom Domain (such as origin.example.com ) | origin.example.com |
Example 2: The address of the origin server is an IP address.
Domain name | Domain type | Description |
---|---|---|
Accelerated domain name: Origin server address: | Domain Name to Accelerate | image.example.com |
Custom Domain | origin.example.com |
Example 3: The address of the origin server is an OSS domain name.
Domain name | Domain type | Description |
---|---|---|
Accelerated domain name: Origin server address: | Domain Name to Accelerate | image.example.com |
Origin Domain Name | example.oss-cn-hangzhou.aliyuncs.com | |
Custom Domain (such as origin.example.com ) | origin.example.com |