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 Referer Validation.
- If your origin server is an OBS bucket, check whether you have configured a referer whitelist on the origin server and specified that blank referers are not allowed, but no referer validation settings are configured on CDN. If the original request does not carry referer information, CDN will not carry any referer information during origin pull. In this case, origin pull fails and the origin server returns status code 403. To fix this fault, modify the referer validation rule in OBS. For details, see Referer Validation.
- If your origin server is an OBS private bucket and OBS authorization is not enabled on CDN, 403 will be returned. Enable OBS authorization on CDN. For details, see OBS Authorization.
- 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 IP 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 the origin server is an OBS bucket, the host must be the domain name of the OBS bucket.
- If your origin server is an object storage bucket of a third party, 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, correct the IP address or domain name of the origin server.
Status Code 405
Symptom: Content of a domain name with CDN acceleration enabled cannot be accessed. Status code 405 is displayed on the Headers tab under Network of the DevTools when you press F12 on the browser.
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot