Security Headers
This section uses a single On/Off switch at the top. Off deletes all of the domain's custom security headers (standard and custom), so no headers are added.
Security Headers let the edge add security headers to responses without changing your origin: X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Content-Security-Policy (CSP), Referrer-Policy, Permissions-Policy, plus a list of arbitrary custom headers.
Use it when you want to set security headers centrally at the CDN (against clickjacking and MIME sniffing, to limit referrer data, and so on) for every page on the domain. Example: set X-Frame-Options: DENY so your pages cannot be embedded in an iframe on another site.
Before you start
- The domain has been added and points to VNIS.
- If you use CSP, prepare a correct policy string in advance (an incorrect CSP can break how the page renders).
How to configure
This section uses a single On/Off switch at the top: On creates and applies the security header set (saved immediately); Off deletes all custom security headers for the domain. The fields are shown even when the switch is Off (as a draft), so you can fill them in first and then switch On.
- Go to Domains → select a domain → Security Headers tab.

- Choose values for the standard headers (for example
X-Frame-Options = DENY,X-Content-Type-Options = nosniff). Leaving a field empty means that header is not set. - (Optional) Add Custom Headers — enter a name and a value.
- Turn the switch On at the top of the section. For later edits, click Save (shown only when the switch is On and there are unsaved changes).
Configuration fields
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| X-Content-Type-Options | Stops the browser from guessing the content type | nosniff or empty | Empty | Only nosniff/empty is accepted; any other value → 400 error |
| X-Frame-Options | Prevents iframe embedding (clickjacking) | DENY / SAMEORIGIN / empty | Empty | — |
| X-XSS-Protection | Enables the browser's legacy XSS filter | 1; mode=block / 1 / 0 / empty | Empty | Choose a value from the dropdown |
| Content-Security-Policy | CSP policy | String, ≤ 16 KiB, no CR/LF | Empty | Invalid format → 400; an incorrect CSP can block the page's own JS/CSS |
| Referrer-Policy | Policy for sending Referer | String | Empty | Use a standard value (the dropdown suggests them) |
| Permissions-Policy | Restricts browser permissions (camera, microphone, and so on) | String, ≤ 16 KiB, no CR/LF | Empty | — |
| Custom Headers | Arbitrary headers | ≤ 50 headers | — | Names must be standard (no :, no spaces); values ≤ 8 KiB, no CR/LF |
Important difference between standard and custom headers:
- Standard headers (the 6 fields above) are added only when the response does not already have that header — that is, they do not overwrite a header returned by the origin.
- Custom headers always overwrite a header with the same name in the response.
Configuration examples
Example: A basic security header set for a website.
- X-Frame-Options:
DENY— prevents the page from being embedded in an iframe (against clickjacking). - X-Content-Type-Options:
nosniff— stops the browser from guessing the content type. - Referrer-Policy:
strict-origin-when-cross-origin— limits URL leakage through theRefererheader. - Content-Security-Policy: start with the minimal policy
default-src 'self'(test it in a test environment first — an overly strict CSP can block the page's own JS/CSS). - Note: the 6 standard headers are added only when the response does not already have that header (they do not overwrite the origin). To force an overwrite, use Header Rules with the
setaction. - Check:
curl -I https://example.com/→ you seex-frame-options: DENYandx-content-type-options: nosniff.
Order of evaluation
- The On/Off switch controls whether the configuration exists: On creates the security header record; Off deletes all custom security headers for the domain (no headers are added).
- Standard headers do not overwrite the origin: if the origin already returns
X-Frame-Options: SAMEORIGIN, yourDENYsetting does not overwrite it — visitors still receiveSAMEORIGIN. - Custom headers overwrite: a custom header always replaces a header with the same name.
- HSTS is not configured here —
Strict-Transport-Securityis controlled by the TLS tab (or the system default) and is sent only over HTTPS connections. - Some headers managed by the CDN itself (such as
Via) are not affected by this feature.
Troubleshooting
| Symptom | Common cause | Fix |
|---|---|---|
| Saving returns 400 on X-Frame-Options | The value is not DENY/SAMEORIGIN/empty | Choose a valid value from the dropdown |
| Saving returns 400 on X-Content-Type-Options | The value is not nosniff | Use nosniff or leave it empty |
| Saving returns 400 on CSP | The CSP contains line breaks (CR/LF) or is > 16 KiB | Remove line breaks and shorten the policy |
| The header is set but does not appear in the response | The origin already returns that header (standard headers do not overwrite the origin) | Use Header Rules with the set action if you need to overwrite it, or change the origin |
| Saving a custom header returns 400 | The name contains :/spaces, there are more than 50 headers, or the value contains CR/LF | Fix it according to the limits in Configuration fields |
FAQ
- Why do I set
X-Frame-Optionsbut visitors still don't see it? Because the origin already returns that header — standard headers are added only when the response does not have them. To force an overwrite, use Header Rules (set). - Which values should I use for
X-XSS-Protection/Referrer-Policy? Use the values offered in the dropdown; browsers may ignore an incorrect value. - Is an incorrect CSP dangerous? Yes. An overly strict CSP can block your page's own JS/CSS. Test it in a test environment first.
- Where do I set HSTS? In the TLS tab, not here.