Security Headers Generator
This free hsts security headers generator helps you generate HTTP security headers (HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, frame options) for Apache and Nginx.
📘 New to this tool? Follow the step by step guide with screenshots.
Quick answer: The Security Headers Generator turns your input, server, HSTS and HSTS preload into ready to edit text. Fill in the fields and the result appears straight away. It is free, needs no account and runs in your browser, so nothing you enter is saved on a server.
On this page
What is the Security Headers Generator?
Create HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy for Apache and Nginx. It is built for site owners, developers and SEOs who look after crawling, indexing and site health.
How do you use this hsts security headers generator?
- Paste your text into Input.
- Choose Server (example: Apache (.htaccess)).
- Tick or untick HSTS (force HTTPS) (example: on).
- Tick or untick HSTS preload (example: on).
- Tick or untick Block framing (clickjacking) (example: on).
- Read the result, then copy or download it.


For a fuller walkthrough, see the step by step guide to the Security Headers Generator.
Which inputs does the Security Headers Generator use?
| Input | Type | Example value |
|---|---|---|
| Input | Text box | Your own value |
| Server | Menu | Apache (.htaccess) |
| HSTS (force HTTPS) | On or off | on |
| HSTS preload | On or off | on |
| Block framing (clickjacking) | On or off | on |
What does a worked example show?
Using Server Apache (.htaccess), HSTS (force HTTPS) on, HSTS preload on and Block framing (clickjacking) on, the tool shows: <If, Module mod_headers.c> Header always set Strict-Transport-Security "max-age=31536000; include, Sub, Domains" Header always set X-Content-Type-Options "nosniff" Header always set…. Swap in your own input to get your own result.
Security and trust
HTTPS with HSTS and basic security headers protect visitors and are part of a trustworthy, well-maintained site.
Key terms
- 301 redirect
- A permanent redirect that sends users and search engines from an old URL to a new one. It passes most ranking signals to the new address, which makes it the standard choice when a page moves or two pages are merged.
- Click through rate
- The share of people who click a result after seeing it, found by dividing clicks by impressions and multiplying by 100. In Google Search Console it helps you spot pages that rank but need a better title or description.
- Core Web Vitals
- Google metrics for real user experience: Largest Contentful Paint for loading, Interaction to Next Paint for responsiveness and Cumulative Layout Shift for visual stability. Good thresholds are 2.5 seconds, 200 milliseconds and 0.1.
- Helpful content
- Content written mainly to help people rather than to rank, which Google systems aim to reward. It shows first hand knowledge, answers the question fully and leaves readers feeling they learned what they needed.
- Search engine optimisation
- The practice of improving a website so it ranks higher in unpaid search results. It covers technical health, on-page content, links and user experience, and it follows Google Search Essentials rather than shortcuts.
How we checked this tool
We tested the Security Headers Generator in Chrome on 2 November 2026 with the example inputs shown above and checked the output by hand. It runs in your browser and does not store what you enter. Read our editorial policy, disclaimer and privacy policy, or report an error on WhatsApp.
Frequently asked questions
What does the Security Headers Generator do?
Create HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy for Apache and Nginx.
Who should use the Security Headers Generator?
The Security Headers Generator is made for site owners, developers and SEOs who look after crawling, indexing and site health. It is simple enough for beginners and quick enough for agencies that run the same check many times a week.
Is the Security Headers Generator free?
Yes. The Security Headers Generator is free with no account, no daily limit and no watermark, and it sits alongside more than 500 other free tools on this site.
Does the Security Headers Generator save my data?
No. All processing happens in your browser with JavaScript. The values and text you enter stay on your device and are not sent to or stored on our server.
How reliable are the results?
The output is a starting draft. Review and edit it so it is accurate and sounds like you before you publish or send it.
Where can I learn more about the Security Headers Generator?
Read the step by step guide with screenshots, linked above, or browse the other free technical seo tools for related checks.
Sources: Google crawling and indexing documentation and Google SEO Starter Guide, checked 2 November 2026.