Manage content display
A CDN resource returns a response from the content origin by default. You can temporarily hide content display to make the CDN resource content unavailable to users.
If you have hidden the content display, you can restore it at any time.
Hide content display
You can hide CDN resource content display in one of the following ways:
- set a status code — the user will receive a response with the specified status code;
- or configure a redirect — the user will be redirected to another link.
Set a status code
-
In the control panel, in the top menu, click Products and select CDN.
-
In the CDN Resources section, open the CDN resource page → General tab.
-
In the Return http status code block, select the Enabled checkbox.
-
In the Response status code field, enter a response code between
100and599, except for redirect codes:301,302,303,307,308. The entered status code will appear in the CDN resource response. -
Optional: in the Response body field, enter the text that will appear in the response.
-
Click Apply. While settings are being applied, the CDN resource enters the
PROCESSINGstatus. You cannot apply other settings during this time. Settings take effect when the CDN resource transitions toACTIVE.
Configure a redirect
-
In the control panel, in the top menu, click Products and select CDN.
-
In the CDN Resources section, open the CDN resource page → General tab.
-
In the Return http status code block, select the Enabled checkbox.
-
In the Response status code field, enter one of the redirect codes:
301,302,303,307,308. -
In the Redirect URL field, enter the link to which the user will be redirected.
-
Click Apply. While settings are being applied, the CDN resource enters the
PROCESSINGstatus. You cannot apply other settings during this time. Settings take effect when the CDN resource transitions toACTIVE. -
Optional: to make the CDN server cache content from the redirect link, enable redirect following. By default, the CDN server only caches the response with the redirect code.
Restore CDN resource content display
-
In the control panel, in the top menu, click Products and select CDN.
-
In the CDN Resources section, open the CDN resource page → General tab.
-
In the Return http status code block, clear the Enabled checkbox.
-
Click Apply. While settings are being applied, the CDN resource enters the
PROCESSINGstatus. You cannot apply other settings during this time. Settings take effect when the CDN resource transitions toACTIVE.