Why Is a 4XX Status Code Returned When I Request Resources from My Acceleration Domain Name?
Status Code 403
If the status code 403 is returned, locate the fault as follows:
- Check whether your origin server can be accessed. For details, see How Do I Check Whether an Access Fault Is Caused by a CDN PoP or Origin Server?
- Check whether the CNAME record matches your acceleration domain name. For details about how to configure the CNAME record, see Configuring a CNAME Record.
- If you have configured referer validation, check whether your request URL is allowed by the referer validation rule. CDN identifies and filters out visitors based on a referer blacklist or whitelist. Unqualified users will receive a 403 error response. For details about the rules, see .
- If you have configured an IP address whitelist or blacklist, check if your IP address is in the blacklist or is not in the whitelist. If it is in the blacklist or is not in the whitelist, your request will be rejected and a 403 status code will be returned. For details, see IP ACL.
- If you have configured a User-Agent blacklist or whitelist, check if your request URL is in the blacklist or is not in the whitelist. If it is in the blacklist or is not in the whitelist, your request will be rejected and a 403 status code will be returned. For details, see User-Agent ACL.
- If you have configured token authentication, check the validity period of the signed URL. If the URL has expired, your access to it will be rejected and a 403 status code will be returned. For details, see Token Authentication.
Status Code 404
If the status code 404 is returned, locate the fault as follows:
- Access the URL of the origin server and check whether 404 is returned. For details, see How Do I Check Whether an Access Fault Is Caused by a CDN PoP or Origin Server?
- If the origin server can be accessed, log in to the CDN console and check whether the host header is correct on the Basic Settings tab of the domain name. For details, see Host Header.
The differences between the origin server and the host are as follows:
- The origin server decides the address to be accessed during origin pull.
- The host decides the site that is associated with the requested content.
Let's assume that the origin server IP address is x.x.x.x, the acceleration domain name is www.example.com, and sites www.a.com and www.b.com are deployed on the origin server.
- If you want CDN to pull content from the origin server, set the origin server to x.x.x.x on CDN.
- By default, the host is the acceleration domain name www.example.com. If you want CDN to pull content from the www.a.com or www.b.com site, set the host to www.a.com or www.b.com.
- If your origin server is an object storage bucket, change the host to the bucket domain name.
- Check whether the origin server configuration is correct on the Basic Settings tab of the domain name on the CDN console. If not, change the IP address or domain name of the origin server to the correct one.
Status Code 405
Symptom: Content of a domain name with CDN acceleration enabled cannot be accessed, and status code 405 is returned on the Headers tab under Network of the DevTools.
Cause: The response header does not support the POST method.
Solution: Edit the HTTP header configuration. Add a rule whose Parameter is Access-Control-Allow-Methods and Value is POST. For details, see HTTP Header Settings (Cross-origin Requests).
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.