If a client requests resources that are not cached on Alibaba Cloud CDN edge nodes, the request is redirected to the origin server to retrieve the resources. Static resources are cached on edge nodes, but dynamic resources are directly returned to clients. If you run a prefetch task on edge nodes, the edge nodes retrieve resources from the origin server and cache the resources. You can configure back-to-origin routing based on your business requirements.

Back-to-origin routing is suitable for the following scenarios and helps you manage domain names.
Scenario Description References
Specify a server domain name for back-to-origin routing 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. Alibaba Cloud CDN redirects requests to the site specified by the HOST header. Configure an origin host
Set the origin protocol policy If a client requests resources that are not cached on edge nodes, Alibaba Cloud CDN redirects the request to the origin server over the protocol specified by the origin protocol policy. You can set the origin protocol policy to follow, HTTP, or HTTPS. Configure the origin protocol policy
Retrieve content from private OSS buckets If your origin server is a private Object Storage Service (OSS) bucket, you must grant Alibaba Cloud CDN access permissions on the private OSS bucket before Alibaba Cloud CDN can access the bucket. Permission control can prevent hotlinking issues. Grant Alibaba Cloud CDN access permissions on a private OSS bucket
Specify a site for back-to-origin routing If edge nodes access your origin over HTTPS and the IP address of the origin server is associated with multiple domain names, you must configure Server Name Indication (SNI) to specify the domain name that edge nodes can access. Configure SNI
Specify a maximum timeout period for back-to-origin requests You can set the amount of time that an edge node waits for a response after a request is redirected to the origin server. The default timeout period is 30 seconds. If the edge node does not receive a response within the specified timeout period, the connection between the edge node and origin server closes. Set a timeout period for back-to-origin requests
Enable or disable 302 redirection If 302 redirection is disabled on edge nodes, and the origin server returns the HTTP 302 status code, the edge nodes return the status code to clients. If 302 redirection is enabled on edge nodes, and the origin server returns the HTTP 302 status code, the edge nodes process the status code instead of directly returning it to clients. Configure 302 redirection
Add, rewrite, or delete an HTTP header from back-to-origin requests You can add HTTP headers to or delete HTTP headers from back-to-origin HTTP requests. Configure an HTTP header for back-to-origin requests
You can also rewrite headers of HTTP requests before they are redirected to origin servers. Rewrite HTTP headers in back-to-origin requests
Add, rewrite, or delete an HTTP header from HTTP responses You can rewrite HTTP headers in responses from origin servers. Rewrite HTTP headers in responses from an origin server
Rewrite URIs in back-to-origin requests You can create rules to rewrite URIs in requests before they are redirected to origin servers. Rewrite URIs in back-to-origin requests
Ignore, add, delete, retain, and modify URL parameters in back-to-origin requests If the parameters in a request URL are different from those that are required to be redirected to the origin server, you can create parameter rewrite rules to rewrite the URL parameters. These rules allow Alibaba Cloud CDN to ignore, add, delete, retain, and modify URL parameters. Rewrite URL parameters in back-to-origin requests