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. If you submit a prefetch task, the CDN edge nodes retrieve resources from the origin server. This process is called back-to-origin routing. You can configure back-to-origin routing based on your business requirements.

Back-to-origin routing is suitable in various scenarios, as described in the following table.
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 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 Alibaba Cloud CDN redirects requests to the origin server over the protocol specified by the origin protocol policy. 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 private OSS buckets before Alibaba Cloud CDN can access the bucket. Permission control can prevent hotlink issues. Grant Alibaba Cloud CDN access permissions on private OSS buckets
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 you want the edge nodes to 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. 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 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 HTTP headers 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 You can create parameter rewrite rules to rewrite parameters in request URLs before they are redirected to the origin server. Rewrite URL parameters in back-to-origin requests