Website Management Tools
Security Headers and CSP Builder
HTTP security headers tell browsers how to treat your site: use HTTPS only, do not guess file types, do not load scripts from just anywhere, and do not allow other sites to frame your pages. This tool builds a set of common headers as ready-to-paste configuration for Apache, Nginx or a _headers file, and checks response headers or a Content-Security-Policy that you paste for missing or weak settings. It works only on text. It never requests your site, so it cannot see what your server actually sends, and no set of headers guarantees that a site is secure.

How to use it
- Choose “Build security headers”, switch on the headers you want and, for a Content-Security-Policy, start from the strict starter and add the hosts your pages genuinely use.
- Pick your server format, read the notes under the output, then copy or download the configuration. Start the CSP in report-only mode.
- To check what you have, switch to “Check headers I already have” and paste the output of curl -I, your browser's response headers, or just a CSP value.
Example
A strict starter CSP reads: default-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'self'. It lets a site load everything only from itself, which is a good baseline to loosen deliberately for each extra host you need.
The headers in this tool
- Strict-Transport-Security: use HTTPS only.
- Content-Security-Policy: restrict where scripts, styles, images, frames and forms may load from or go to.
- X-Content-Type-Options: nosniff: stop browsers guessing a file's type.
- X-Frame-Options and frame-ancestors: control who can embed your pages.
- Referrer-Policy: limit what address information is sent to other sites.
- Permissions-Policy: switch off browser features such as camera, microphone and location.
- Cross-Origin-Opener, Resource and Embedder Policies: advanced isolation settings; the embedder policy can break third-party content, so test carefully.
Rolling out a CSP safely
- Start with report-only and the strict starter.
- Add each host your site really needs, one directive at a time.
- Replace 'unsafe-inline' with nonces or hashes where you can.
- Enforce the policy once it stops reporting legitimate blocks.
You can check redirects with the WWW redirect checker and generate your robots.txt separately. Header names and values are plain text, and the URL encoder can help with addresses inside a policy.
What this tool cannot do
- Read your live headers, or check headers that a CDN or proxy adds or removes for some requests.
- Know which hosts your pages need: you must add them yourself.
- Replace a security review, or guarantee protection.
Limits
- Pasted headers up to 200,000 characters.
- The CSP checker knows the common directives and the source syntax; newer or experimental directives are reported as unknown.
- Apache output needs mod_headers; Nginx values with a dollar sign need care.
Questions
Will these headers make my site secure?
No. They are one layer of defence that reduces the damage from certain attacks, such as injected scripts, downgrade to HTTP and clickjacking. They do not fix vulnerable code, weak passwords or outdated software, and no checker can promise a site is secure.
Why start with Content-Security-Policy-Report-Only?
A policy that is too strict blocks scripts, styles or images your pages need and can break them. Report-only mode does not block anything, so you can watch what would have been blocked and adjust before you enforce the policy.
What does HSTS do, and what is the preload option?
Strict-Transport-Security tells browsers to use only HTTPS for your site for a set time. Preload goes further and asks browsers to build the rule in permanently. It is hard to undo, requires includeSubDomains and a long max-age, and should only be used when every subdomain will always support HTTPS.
Can this tool test my live site?
No. A web page cannot read the headers of another site because of browser security rules, and this tool never contacts your server. Run curl -I https://your-site or use your browser's developer tools, and paste the headers into the checker.
Why is 'unsafe-inline' flagged?
With 'unsafe-inline' in script-src, a script injected into a page can run, which removes much of the point of a CSP. Nonces or hashes let you allow specific inline scripts instead. The tool explains each warning in plain language.
Is my text uploaded anywhere?
No. Everything is built and checked in your browser. Nothing is sent to us.
Get practical SEO tips by email
Occasional emails with new guides and tools. Confirm by email first; unsubscribe in one click.
