Home / Guides / How to Check Website Security Headers

Updated

How to Check Website Security Headers (HSTS, CSP)

Run curl -sI https://www.python.org/ and look for Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Permissions-Policy. On 2 December 2026 python.org sent HSTS with preload and X-Frame-Options, but its CSP only in Report-Only mode. In bulk, Plainprobe Domain Intelligence returns a 0-100 security headers grade with one fix per missing header.

1. One site with curl

curl -sI https://www.python.org/ | grep -iE '^(strict-transport-security|content-security-policy|x-content-type-options|x-frame-options|referrer-policy|permissions-policy)'

On 2 December 2026 this printed strict-transport-security: max-age=63072000; includeSubDomains; preload, x-frame-options: SAMEORIGIN and content-security-policy-report-only: .... Missing lines are missing headers.

2. What each header does

HeaderProtects againstTypical value
Strict-Transport-SecurityDowngrade to HTTPmax-age=31536000; includeSubDomains
Content-Security-PolicyInjected scripts (XSS)default-src 'self'; script-src with nonces
X-Content-Type-OptionsMIME sniffingnosniff
X-Frame-OptionsClickjackingDENY or SAMEORIGIN
Referrer-PolicyURL leaks to other sitesstrict-origin-when-cross-origin
Permissions-PolicyUnwanted camera, microphone, locationcamera=(), microphone=(), geolocation=()

3. Common mistakes

4. Many sites, graded, as JSON

Plainprobe Domain & Tech Stack Intelligence returns securityHeaders.score (0-100), which of the six headers are present, and one actionable fix per issue, next to DNS, SPF/DMARC, SSL and technologies, at $0.003 per domain. Real output for apify.com on 2 December 2026: score 68, Referrer-Policy and Permissions-Policy missing, fix for the first: Add "Referrer-Policy: strict-origin-when-cross-origin". For a page-level SEO and AI-readiness review, see the website audit.

Limits to keep in mind

Security headers do not affect speed; to check loading performance, see how to check Core Web Vitals.

FAQ

Which HTTP security headers should a website send?

The usual six are Strict-Transport-Security (HSTS), Content-Security-Policy, X-Content-Type-Options: nosniff, X-Frame-Options (or CSP frame-ancestors), Referrer-Policy and Permissions-Policy.

Does Content-Security-Policy-Report-Only protect the site?

No. The Report-Only variant only reports violations to the browser console or a reporting endpoint; it blocks nothing. python.org sent it in report-only mode on 2 December 2026.

What is a good HSTS value?

max-age of at least one year (31536000) with includeSubDomains; add preload only once every subdomain serves HTTPS. python.org sends max-age=63072000; includeSubDomains; preload.

Can I check headers without loading the whole page?

Yes: curl -sI sends a HEAD request and prints only the response headers. Some servers answer HEAD differently from GET, so confirm with curl -s -D - -o /dev/null for a GET.

Related tool