What do HTTP Status Codes tell me about my CDN resource?
Different HTTP status code carries different meaning of the HTTP request. If your CDN hostname returns the following status code:
Status 2XX (200,201,202, etc) - It means the HTTP request is successful
Status 3XX (301, 302, etc) - It means there is a redirection layer being setup (at the origin/webserver). To avoid any redirection conflict when you use CDN, you may make use of IP origin instead of hostname origin. For example, instead of using "www.mywebsite.com" as origin, you should use the IP address of "www.mywebsite.com" as the CDN resource origin.
Status 4xx (401,402, etc) - It means the CDN PoP (edge servers) is having issue. When this happened, check if: (1) your cdn resource status is "Active" (if it is in "preparing", then 4xx is correct behavior because the cdn resource config has not been populated to the CDN edge)
(2) did you set any country access on your cdn resource (if yes, then 4xx status code is correct behavior provided that you are coming from the prohibited countries)
(3) check in "content compare" which edge server is throwing 4xx error. If it is only happened on few cdn edge servers but not all, then please submit a support ticket to zendesk and remove those location from your cdn edge group temporary to avoid users continue getting 4xx error.
5xx (501, 502, etc) - It means CDN edge servers are having problem to fetch content from the CDN resource origin. Please ensure that:
- The Origin HTTP is accessible.
- Firewall has not blocked the edge server.
- DNS for the origin hostname is working.