Domain health guide
Essential HTTP security headers
HTTP security headers are browser instructions sent with a website response. They can reduce common risks, but a header is useful only when it fits the application and has been tested safely.
The three headers this checker reports
Content-Security-Policy can define which content sources a browser is allowed to load. It is powerful, but a policy should be designed around the application's real scripts, styles, frames, and third-party services.
Strict-Transport-Security tells supporting browsers to prefer HTTPS for a period of time. X-Frame-Options can help control whether a page is framed. CloudSpex currently reports whether these headers are present on the final safe HTTPS response.
Presence is not a full security review
A present header can still have a value that is unsuitable, too broad, or incompatible with the site's workflow. Conversely, an absent header may need a carefully tested implementation rather than a blind copy-and-paste fix.
The public checker intentionally reports a small allowlist of header-presence signals. It does not rate policy strength, expose raw response headers, or replace application security testing.
Make changes safely
Identify the layer that adds headers: application code, web server, CDN, reverse proxy, or hosting control panel. Change one policy at a time and test key user flows, embedded content, authentication, and third-party integrations.
- Check the public HTTPS response after a deployment or proxy change.
- Find the configuration owner for each header.
- Use a report-only or staged approach where the platform supports it.
- Test critical user flows before enforcing a restrictive policy.
- Recheck after CDN, hosting, or application changes.
Keep HTTPS fundamentals in view
Security headers work alongside, not instead of, HTTPS certificate validity, DNS correctness, secure cookies, application access controls, and vulnerability management.
Use the result as one operational signal in a broader security review.
How to see the headers a site sends
Security headers are part of the HTTP response, so the first step is to read them directly. Check the final page after any redirects, and check over HTTPS: a header sent on a plain HTTP response is either ignored or irrelevant.
curl -sI https://example.com/
HTTP/2 200
strict-transport-security: max-age=31536000; includeSubDomains
content-security-policy: default-src 'self'; frame-ancestors 'none'
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-originStrict-Transport-Security
HSTS tells a browser to use HTTPS for every future request to the host, for the number of seconds given in max-age. After the first visit, a browser will not make a plain HTTP request to that host at all, which closes the window in which a connection could be intercepted before the redirect to HTTPS.
It is also the header with the most lasting consequences. Once a browser has stored the policy, the site must keep working over HTTPS for the whole max-age period. With includeSubDomains, the same applies to every subdomain, including internal ones that someone may still be reaching over HTTP. Roll it out with a short max-age first.
- Confirm that every page and every subdomain works over HTTPS.
- Send the header with max-age=300 and check that nothing breaks.
- Raise max-age to a week, then a month, then a year.
- Add includeSubDomains only after auditing subdomains.
- Treat preload as permanent. Removal from browser preload lists takes months.
Strict-Transport-Security: max-age=300
Strict-Transport-Security: max-age=31536000; includeSubDomainsContent-Security-Policy
A content security policy tells the browser which sources a page may load scripts, styles, images, frames and other resources from. Its main purpose is to limit the damage of cross-site scripting: an injected script that is not on the allowed list does not run.
CSP is the hardest header to deploy because it must match how the site is actually built. A policy that is too strict breaks analytics, payment widgets or inline scripts; a policy loosened with unsafe-inline for scripts gives up most of the protection. The reliable route is to start in report-only mode, where the browser reports what it would have blocked without blocking it.
- Publish the policy as Content-Security-Policy-Report-Only.
- Collect the violations for a period that covers all normal use of the site.
- Add the legitimate sources to the policy; remove or rewrite inline scripts where possible, or allow them with a nonce.
- Switch the header name to Content-Security-Policy.
- Keep a report-only policy alongside it when testing a stricter version.
Content-Security-Policy-Report-Only: default-src 'self';
script-src 'self' https://cdn.example.net;
img-src 'self' data:;
frame-ancestors 'none';
base-uri 'self'Clickjacking protection
Clickjacking places your site in an invisible frame on another page and tricks a visitor into clicking something on it. Two mechanisms prevent framing. X-Frame-Options is the older one, with the values DENY and SAMEORIGIN. The frame-ancestors directive of CSP replaces it and allows a list of permitted parent sites.
Where both are sent, browsers that support frame-ancestors use it and ignore X-Frame-Options. Sending both is reasonable for compatibility. A page that must be embedded by a partner should list that partner in frame-ancestors rather than removing the protection.
X-Content-Type-Options
This header has a single useful value, nosniff. It tells the browser to trust the declared content type instead of guessing from the content, which prevents a file uploaded as an image from being executed as a script. It has no configuration and almost no risk, provided the server sends correct content types for its scripts and stylesheets. It is the easiest header to add.
Referrer-Policy and Permissions-Policy
Referrer-Policy controls how much of the current address is sent to the next site when a visitor follows a link or a resource is loaded. The value strict-origin-when-cross-origin sends the full address within your own site and only the origin to others, and nothing when going from HTTPS to HTTP. It is the default in current browsers, and setting it explicitly protects visitors on older ones. Addresses that contain tokens or personal data are the reason this matters.
Permissions-Policy lets a site switch off browser features it does not use, such as the camera, microphone and geolocation, for itself and for any frames it embeds. It limits what a compromised or third-party script can ask the visitor for.
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()Headers to remove
Not every security header is still useful. X-XSS-Protection controlled a browser filter that has been removed from current browsers and could itself be abused; it should be absent or set to 0. Public-Key-Pins is deprecated and was removed after it caused sites to lock themselves out. Expect-CT is obsolete now that certificate transparency is enforced by default.
Headers that reveal software versions, such as Server with a full version number and X-Powered-By, are not protections at all. They are worth trimming because they make it easier to match a site to a known vulnerability.
Where headers are set, and where they get lost
A header can be added by the application, the web server, a reverse proxy or a CDN, and the layers do not always agree. Three effects are worth checking. The same header set in two layers can be sent twice with different values, and browsers then apply rules that differ per header. A header set in the application may be missing from static files, error pages and redirects, which are served by a different layer. And a CDN may cache a response from before the header was added.
Test several kinds of response, not just the home page: a static asset, a page that returns 404, a redirect and an API endpoint.
What a header check cannot tell you
A scanner sees which headers are present and can judge some values. It cannot know whether a content security policy matches what the application needs, or whether the application has vulnerabilities that headers do not address. Headers reduce the impact of certain attacks in the browser; they do not replace input validation, access control or patching. The CloudSpex Security Headers Checker reports which headers a public page sends and does not present their presence as a security verdict.
Cookies and cross-origin isolation
Two neighbouring topics are often discussed together with security headers. Cookie attributes are set in the Set-Cookie header and matter as much as any header on this list: Secure keeps a cookie off plain HTTP, HttpOnly hides it from scripts, and SameSite limits when it is sent with requests that start on another site. A session cookie without them undoes much of what the other headers achieve.
The cross-origin headers, Cross-Origin-Opener-Policy, Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy, isolate a page from other sites that open or embed it. They are needed for a few powerful browser features and are otherwise optional. Add them deliberately, because they can break pop-up based login flows and embedded third-party content.
Frequently asked questions
Does a present CSP mean my site is secure?
No. CSP presence alone does not prove that the policy is appropriate or that the application has no other security issues.
Should I add HSTS immediately?
Confirm the entire site is reliably available over HTTPS first. An HSTS policy can make recovery harder if HTTPS is not ready.
Does CloudSpex show raw headers?
No. The public result exposes only a small sanitized allowlist of supported header signals.
Which security header should I add first?
X-Content-Type-Options: nosniff and a Referrer-Policy carry almost no risk. HSTS with a short max-age comes next. Content-Security-Policy takes the most work and should start in report-only mode.
Can HSTS be undone?
Send the header with max-age=0 and browsers that visit again will drop the policy. Browsers that do not revisit keep it until it expires, and a preloaded domain stays preloaded until browsers ship an updated list.
Is X-Frame-Options still needed?
The frame-ancestors directive of CSP replaces it. Sending both is harmless and covers older browsers.
Use public checks as a starting point
CloudSpex reads limited public-facing signals. It does not change DNS, website, certificate, or email settings. Confirm the responsible provider and test relevant changes before applying a remediation.
Editorial details
Author and reviewer: CloudSpex. Sources: public technical standards and provider documentation relevant to the topic. Last reviewed: November 10, 2026. We update guides when the product behavior or the underlying guidance changes.