All Products
Search
Document Center

:Access Alibaba Cloud Content Delivery Network Acceleration Resources Returns 404 status code

Last Updated:Jan 13, 2022

Issue

After the resource to be accessed is configured for Alibaba Cloud CDN acceleration, the "404 Not Found" error appears when you access the accelerated resource.

Cause

If 404 errors are found through monitoring, you can confirm the URL of the 404 through the Alibaba Cloud Content Delivery Network log. If the URL of the 404 is known, you can bind the origin to test whether the resource exists. Generally, there are several reasons:

  • The origin resource does not exist.
  • The error message returned because the origin host is incorrectly configured.
  • The back-to-origin port is incorrectly configured.

Solution

After you use Alibaba Cloud Content Delivery Network acceleration resources, 404 error codes are returned when you access acceleration resources. Troubleshoot the following:

The origin resource does not exist.

For more information, see How to point a domain name to a Alibaba Cloud Content Delivery Network origin without modifying domain name resolution. Bind a Alibaba Cloud Content Delivery Network accelerated domain name to the origin, test the URL of the 404 when accessing resources, and check whether the origin returns 404. If the origin returns 404, check whether the resources of the origin exist.

Back-to-origin HOST configuration error


Back-to-origin host refers to the domain name of the site that the Alibaba Cloud Content Delivery Network node accesses on the origin site during the back-to-origin process. If you want to access a specific server domain name during the back-to-origin Alibaba Cloud Content Delivery Network node, you must configure the domain name type of the back-to-origin host. For more information, see Configure the back-to-origin host. The origin host supports the following types of domain name: accelerated domain name, domain name of an origin server, and custom domain name. If the back-to-origin HOST is incorrectly configured, the origin server cannot recognize the back-to-origin HOST. The origin server also responds to the 404. The differences between the origin server and the origin host are as follows:

  • An origin server is where your workloads run, and defines a specific IP address to which requests are redirected.
  • 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.

Back-to-origin port configuration error

This problem usually occurs when the port of the origin server is a non -80/443 port. For example, if the port of the origin server HTTP service is 8080, when configuring the back-to-origin port on the Alibaba Cloud Content Delivery Network, you need to configure the custom back-to-origin port to 8080 and disable the protocol follow-back-to-origin feature. Otherwise, the custom port cannot take effect. For more information about how to disable the protocol follow-back-to-origin feature, see Configure the back-to-origin protocol.

References

Applicable scope

  • CDN