New: 500+ free SEO and AI search tools, no sign-up.Explore tools →

How to Use the Security Headers Generator (Step by Step Guide)

By Hasnain Sanmal
Security Headers Generator: how to fill in the tool

This guide explains how to use Hsts Security Headers Generator, step by step, with screenshots of the real tool. It is written for site owners, developers and SEOs who look after crawling, indexing and site health. Generate HTTP security headers (HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, frame options) for Apache and Nginx.

Quick answer: To use the Security Headers Generator, open the free tool, paste the input, choose the server, tick the HSTS and tick the HSTS preload, then copy the text it creates. Everything runs in your browser, so there is no sign up and nothing you type is stored on a server.

how to use Hsts Security Headers Generator: Security Headers Generator with example inputs
Screenshot of the live Security Headers Generator with its example values.

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 also known as a hsts security headers generator tool.

HTTPS with HSTS and basic security headers protect visitors and are part of a trustworthy, well-maintained site.

How to use Hsts Security Headers Generator step by step

  1. Step 1: Open the Security Headers Generator

    Go to the Security Headers Generator on hasnainsanmal.com, our free hsts security headers generator tool. It loads with example values already filled in, so you can see how it works straight away. It works the same way on a phone, tablet or computer.

  2. Step 2: Paste Input

    Paste or type your text into Input.

  3. Step 3: Choose Server

    Choose an option from Server. Options include Apache (.htaccess) and Nginx. The example uses Apache (.htaccess).

  4. Step 4: Tick HSTS

    Tick HSTS (force HTTPS) if you want this option, or leave it empty to turn it off.

  5. Step 5: Tick HSTS preload

    Tick HSTS preload if you want this option, or leave it empty to turn it off.

  6. Step 6: Tick Block framing

    Tick Block framing (clickjacking) if you want this option, or leave it empty to turn it off.

  7. Step 7: Read the results

    The output appears inside the tool card. Change any input to compare different scenarios.

    Security Headers Generator results example
    Screenshot of the Security Headers Generator results.
  8. Step 8: Copy or download the output

    Use Copy to take the result into your document, CMS, spreadsheet or report.

What does each field in the Security Headers Generator mean?

Field What to enter Example
Input Text, one item per line where asked Your own value
Server Choose one option (Apache (.htaccess), Nginx) Apache (.htaccess)
HSTS (force HTTPS) Tick to turn on on
HSTS preload Tick to turn on on
Block framing (clickjacking) Tick to turn on on

What does a worked example look like?

With the example inputs (Server: Apache (.htaccess), HSTS (force HTTPS): on, HSTS preload: on and Block framing (clickjacking): on), the Security Headers Generator returns: <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 Referrer-Policy…

Replace the example with your own input to get your own result, then review it before you use it.

How do you get the best results from the Security Headers Generator?

  • Re-check after every theme, plugin or server change.
  • Confirm fixes in Google Search Console with URL Inspection.

Bookmark this hsts security headers generator guide so you can repeat the steps quickly. For background, read the Google crawling and indexing documentation. If you are working on a related task, our guide on how to use the Pagination SEO Code Generator walks through it the same way. You can also browse all free Technical SEO Tools.

What mistakes should you avoid with the Security Headers Generator?

  • Testing on a staging copy and forgetting that the live site has different rules.
  • Fixing one URL and not checking the template that created the problem.
  • Changing URLs without adding 301 redirects.

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.

Related free tools

Frequently asked questions

Is the Security Headers Generator free to use?

Yes. The Security Headers Generator is a completely free hsts security headers generator tool, with no sign up, no daily limit and no watermark. It is one of more than 500 free SEO and marketing tools on hasnainsanmal.com.

Is my data stored when I use the Security Headers Generator?

No. The Security Headers Generator runs in your browser with JavaScript, so the values and text you enter are processed on your own device and are not sent to or saved on our server.

How accurate is the Security Headers Generator?

It creates a solid first draft from your inputs. Always review and edit the output so it is accurate, specific and sounds like you before you publish or send it.

Does the Security Headers Generator work on a phone?

Yes. The tool is built for screens from 360 pixels wide, so you can use the Security Headers Generator on a phone, tablet or computer in any modern browser.

Can I use the Security Headers Generator for client work?

Yes. You can use the results for your own sites and for client projects. Check the output first, and keep a note of the inputs you used so you can repeat the check later.

What should I do after using the Security Headers Generator?

Apply the result on your page, campaign or document, then measure the effect. If you would like expert help, see the SEO services or message Hasnain on WhatsApp for a free recommendation.

How we checked this guide: every step and screenshot was taken from the live Security Headers Generator on 2 November 2026. Further reading: Google SEO Starter Guide.

Hasnain Sanmal
Hasnain Sanmal

SEO and guest post outreach specialist with 2000+ completed orders and a list of 1000+ hand-picked, high-authority websites. More about me

Need high-authority backlinks?

Get niche-relevant guest posts from my own outreach list of 1000+ websites.

Chat on WhatsApp

More to read

All articles