Skip to content
LookupOwl

Security headers checker

Enter a URL and get a grade for the headers that tell browsers how to protect your visitors, with the exact header to add for every gap.

We follow redirects and grade the page you land on.

More options

Follow redirects (up to 10 hops, each checked again) and grade the final response, or stop at the first response. A redirect response is not graded.

Format of the copy-paste fix snippets: header (a plain header line), nginx, apache, caddy, cloudflare, vercel, netlify, nextjs or express.

What this checker looks at

Every web response starts with headers, and a handful of them are instructions to the browser about safety. They decide whether an injected script may run, whether the page can be tucked invisibly inside another site, whether the connection must stay on HTTPS and how much of the address leaks when someone clicks a link. None of them show on the page, so the only way to know they are there is to look. This tool fetches the page from LookupOwl's server, follows any redirects to the page a visitor would land on, and grades the headers of that final response.

Nine headers are scored: Content-Security-Policy, Strict-Transport-Security, frame protection (X-Frame-Options or the CSP frame-ancestors directive), X-Content-Type-Options, Referrer-Policy, Permissions-Policy and the three cross-origin headers (Cross-Origin-Opener-Policy, Cross-Origin-Embedder-Policy and Cross-Origin-Resource-Policy). Beyond the grade, you also get a warning list for leaked server versions, deprecated headers that can do harm and headers sent twice with different values, plus a cookie audit that sits outside the score.

For each header the result says what it is, why it matters, what your response does and the exact line to send. The Content-Security-Policy gets its own tab, where every directive is read and every gap is explained in plain words.

How to use it

  1. Enter the addressType https://example.com/ or just example.com. A bare host is tried over HTTPS first and over plain HTTP only if HTTPS cannot be reached. Pick the page that matters: a home page and an API endpoint often send different headers.
  2. Choose a snippet formatUnder More options, pick where you will add the fixes: a plain header line, nginx, Apache, Caddy, Cloudflare Transform Rules, Vercel, Netlify, Next.js or Express. The grade does not change, only the wording of the copy-paste snippets.
  3. Work from the topFixes appear in the Headers tab, biggest gaps first. Start with the ones worth the most points, add them in your staging setup, then run the check again to see the grade move.
Shell
# The same check from a terminal, as JSON
curl "https://lookupowl.com/api/v1/tools/security-headers?url=https://example.com&platform=nginx"

How the grade is worked out

The rules are fixed and public, so the same response always gets the same grade. They are our own, loosely in the spirit of other header graders but not copied from any of them, and they say nothing about whether a site is safe overall. Each of the nine headers has a weight, and the weights add up to 100. A header is rated good (all of its weight), ok (60 percent), weak (25 percent) or missing (nothing).

HeaderPointsGood means
Content-Security-Policy25Scripts and plugins are restricted, with no unsafe-inline, wildcard or whole-scheme script sources.
Strict-Transport-Security20max-age of at least 15552000 seconds (180 days) on an HTTPS response.
Frame protection12DENY or SAMEORIGIN, or a CSP frame-ancestors list that is not a wildcard.
X-Content-Type-Options12The value nosniff.
Referrer-Policy11A policy that keeps full URLs from other sites, such as strict-origin-when-cross-origin.
Permissions-Policy10Present, with no powerful feature opened to every origin.
Cross-Origin-Opener-Policy4same-origin.
Cross-Origin-Embedder-Policy3require-corp or credentialless.
Cross-Origin-Resource-Policy3same-origin or same-site.

Points are then taken off, up to 20 in all, for three points per header sent twice with conflicting values (a conflicting X-Frame-Options already lowers its own rating instead), five for a Public-Key-Pins header or for Access-Control-Allow-Origin: * combined with credentials, two for a server version shown in Server or X-Powered-By, and one or two for an X-XSS-Protection header that switches on the retired browser filter. A response served over plain HTTP cannot score above 59. The score becomes a grade: 97 and above is A+ (and only if nothing was taken off), 90 is A, 75 is B, 60 is C, 40 is D and anything lower is F.

The three cross-origin headers are worth little on purpose. They are opt-in, and the embedder policy in particular can break a page that loads images or widgets from other sites. A site with the six classic headers done well scores 90, which is an A, and the last few points are the reward for going all the way.

Fixing what it finds

These are sensible starting values, not a copy-and-forget recipe. Each snippet in the result is the same header written for your platform.

HeaderA reasonable valueWatch out for
Strict-Transport-Securitymax-age=31536000; includeSubDomainsAdd includeSubDomains only when every subdomain works over HTTPS, and preload only when you mean it: removal from the browser list takes months.
Content-Security-Policydefault-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'Start with Content-Security-Policy-Report-Only, read the reports, then enforce. Replace unsafe-inline with nonces or hashes.
X-Frame-OptionsDENYUse SAMEORIGIN if your own pages frame each other. A CSP frame-ancestors directive does the same job and wins in current browsers.
X-Content-Type-OptionsnosniffMake sure scripts and styles are served with the right Content-Type, or they will stop loading.
Referrer-Policystrict-origin-when-cross-originUse no-referrer if nothing you link to needs to know where visitors came from.
Permissions-Policycamera=(), microphone=(), geolocation=()List only features you do not use; a feature your page needs must stay allowed.

When a header shows up twice

A common surprise is a header that appears two times, often with different values. It happens when the web server adds a header in its configuration and the application or a hosting panel adds it again, so the browser receives both. For X-Frame-Options the browsers do not agree on what a repeated or conflicting header means, and some ignore it, which silently removes the protection. The result lists every repeated header with each value it carried. The cure is to decide which layer owns the header, keep it there and remove it from the others.

What it cannot see

  • One anonymous request. The check carries no login, no stored session and no custom headers, so it grades what a first-time visitor gets. A page behind a login, or one that serves different headers to different paths, needs its own check.
  • Headers only. The page body is never read. A policy set in a <meta> tag, Subresource Integrity attributes and mixed content inside the page are all invisible here.
  • A policy is judged, not tested. The Content-Security-Policy is read directive by directive against known weak patterns. We do not load your page to see what the policy blocks, so a good grade is not proof that nothing is exposed.
  • CORS only as sent. A plain request carries no Origin, so we see the CORS headers a site sends by default and not how it answers a hostile origin.
  • Cookies sit outside the score. They are listed with their flags (names and attributes, never values) so you can review them, but a missing flag does not change the grade.

The request comes from our server, which looks up the host once, checks that every address is public and connects to that exact address. Fresh checks of any one domain are limited across all callers, and results are kept for five minutes. For the full response, timing and caching details, use the HTTP headers checker; for the certificate behind HTTPS, use the SSL checker.

Questions people ask

What is a good security headers score?

A or better means the headers that matter are all in place and set sensibly. A site with every header except a Content-Security-Policy can reach at most 75, a B, and many land in the C range. The grade is a checklist to work through, so look at which headers cost points rather than at the letter alone.

Why did my site get an F when it seems secure?

The grade only counts the headers a response sends, not how well the application is written. Many well-run sites send few of them because nobody set them up. Most of the 100 points come from three headers (a Content-Security-Policy, HSTS and frame protection), so adding those lifts the grade quickly.

Do security headers replace fixing vulnerabilities?

No. They are a second line of defence that limits the damage when something slips through, such as an injected script or a framing attack. They do not fix insecure code, weak passwords or outdated software, so treat a good grade as one layer, not a finish line.

Which header should I add first?

Start with Strict-Transport-Security and X-Content-Type-Options, which almost never break anything. Then add frame protection and a Referrer-Policy. Leave the Content-Security-Policy for last, since it is worth the most points and needs the most care: run it in report-only mode first.

Why does it say a header is sent twice?

Two layers of your setup are each adding it, such as the web server and the application, or a hosting control panel and a CDN. If the values differ, browsers may pick one, pick the last or ignore the header. Choose one layer to own the header and remove it from the other.

Is Content-Security-Policy-Report-Only enough?

It is a good first step but it does not protect anyone, because violations are reported and never blocked. The grade treats it as weak for that reason. Once the reports show nothing legitimate is being flagged, send the same policy as Content-Security-Policy.

Can I use this check from a script or an AI assistant?

Yes. The same result is available as JSON from the REST API and as the security_headers tool on the MCP server, with no key or signup. Pass the URL and, if you like, the platform you want fix snippets for. Fresh checks of one domain are limited to 30 a minute across all callers.

Use it from AI, the API or the command line

Every LookupOwl tool is also a free API and an MCP tool, with no key and no account. This one is security_headers. Please be kind to the rate limits.

curl
curl "https://lookupowl.com/api/v1/tools/security-headers?q=https%3A%2F%2Fexample.com%2F"
MCP
claude mcp add --transport http lookupowl https://lookupowl.com/mcp