Symptoms
After you use Alibaba Cloud CDN to accelerate your domain name, the browser displays the following message after users access the domain name: This page isn't working. xxx redirected you too many times. Error message: ERR_TOO_MANY_REDIRECTS.
Causes
The browser limits the maximum number of redirects for a single request. For example, Chrome terminates a request after it is redirected more than 20 times and prompts the too many directs error.
If this error never occurred before Alibaba Cloud CDN is used, and occasionally occurs after Alibaba Cloud CDN is used, the origin server may be improperly configured, resulting in an infinite redirection loop during back-to-origin routing.
Common cause: When forced redirection over HTTPS is enabled for the origin server, back-to-origin requests over HTTP are redirected to HTTPS. In this case, if origin port 80 or the static origin protocol policy is configured for the domain name, back-to-origin requests over HTTP may cause an infinite loop.
- The client accesses the accelerated domain name
http://example.aliyun.com/
. - Alibaba Cloud CDN specifies port 80 for back-to-origin routing. When back-to-origin
requests are sent to the origin server over HTTP, the origin server redirects the
requests to
https://example.aliyun.com/
. - The client accesses the redirected URL
https://example.aliyun.com/
. - Because Alibaba Cloud CDN specifies port 80 for back-to-origin routing, the back-to-origin
requests are still sent over HTTP, and the origin server redirects the requests to
https://example.aliyun.com/
again. - The client accesses the redirected URL
https://example.aliyun.com/
again, after which Steps 3 and 4 are infinitely repeated.
Solutions
If the issue that you encounter meets the preceding logic, you can modify the back-to-origin configuration by performing the following steps.