Skip to content
TrustYourWebsite

Free Tool

Free Security Headers Checker

Enter your URL to check which security headers are present and get a grade with specific recommendations to improve your security posture.

How it works

1

Enter your URL

Paste your website address into the checker above.

2

We check the headers

The tool fetches your page and inspects all HTTP security headers against best practices.

3

Review your grade

See which headers are present, missing or misconfigured with plain-language explanations.

What this tool checks

  • Strict-Transport-Security (HSTS)

    Forces HTTPS connections and prevents downgrade attacks.

  • Content-Security-Policy (CSP)

    Controls which resources the browser can load to block XSS attacks.

  • X-Frame-Options

    Prevents clickjacking by blocking your site from being embedded in iframes.

  • X-Content-Type-Options

    Stops browsers from guessing content types, blocking MIME-sniffing attacks.

  • Referrer-Policy and Permissions-Policy

    Controls referrer information sharing and browser feature access.

Why security headers matter

Security headers are instructions your web server sends to browsers along with every page. They tell the browser what it is allowed to do and what it should block. Without them your site is more vulnerable to cross-site scripting (XSS), clickjacking, data injection and man-in-the-middle attacks.

Most modern web frameworks make it straightforward to add security headers. A few lines of configuration can block entire classes of attacks. Yet many websites still ship without basic headers because they are invisible to the naked eye.

Google also considers HTTPS and security signals as ranking factors. A properly secured site not only protects your visitors but can perform better in search results.

GDPR Article 32 and security headers

Article 32 of the GDPR requires appropriate technical and organisational measures to secure personal data. The text does not list HTTP headers. It leaves it to the data controller to determine what is appropriate given the risks.

In practice, the AP (Autoriteit Persoonsgegevens), the NCSC-NL, ENISA, OWASP and other supervisory authorities cite security headers as a baseline requirement for any website. The AP's published guidance and enforcement decisions consistently highlight TLS configuration and HTTP security headers as expected measures.

In the event of a data breach, the absence of security headers is an aggravating factor in the AP's analysis. This has occurred in several cases where the exploited vulnerability would have been blocked by a proper CSP policy or by HSTS.

This is not absolute protection. It is a baseline measure that any supervisory authority, including the AP, considers standard for a site processing personal data.

The six headers that really matter

There are around fifteen HTTP headers related to security. Six of them do the heavy lifting.

Strict-Transport-Security (HSTS). Forces the browser to use HTTPS for all subsequent requests to your domain. Typical configuration: Strict-Transport-Security: max-age=31536000; includeSubDomains. Common mistake: enabling HSTS with a max-age that is too short or without includeSubDomains.

Content-Security-Policy (CSP). Controls which sources can load code on your page. It is the strongest defence against cross-site scripting. Difficult to configure without breaking the site. Start in report-only mode for two weeks before switching to enforce.

X-Frame-Options. Prevents your site from being displayed in an iframe on a third-party domain. Blocks clickjacking. Recommended value: SAMEORIGIN. Largely replaced by the frame-ancestors CSP directive, but keep it for older browsers.

X-Content-Type-Options. Only one useful value: nosniff. Prevents the browser from guessing the MIME type of a resource. Blocks a class of upload-based attacks.

Referrer-Policy. Controls the information sent in the Referer header during outbound navigation. Recommended value: strict-origin-when-cross-origin. Protects user privacy by limiting URL leaks to third-party sites.

Permissions-Policy. Disables browser APIs your site does not use. Camera, microphone, geolocation, sensors. Minimal typical configuration: Permissions-Policy: camera=(), microphone=(), geolocation=().

Configuration by server type

The three most common environments for a Dutch SME website: Apache, Nginx, and Cloudflare as a layer in front of the origin.

Apache (.htaccess or httpd.conf):

<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
  Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"
  Header always set X-Frame-Options "SAMEORIGIN"
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
</IfModule>

Nginx (inside the server block):

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;

Cloudflare Transform Rules. From the Rules > Transform Rules > Modify Response Header tab, add each header as a separate rule. Advantage: no access to the origin server needed. Limitation: be careful not to define the same header twice, once on the origin and once on Cloudflare, which creates duplicate values that some browsers ignore.

Common pitfalls and how to avoid them

Five mistakes appear in 90% of audits.

CSP too strict from the start. The site breaks, administrators revert to default-src * and give up. Solution: start with Content-Security-Policy-Report-Only with a reporting endpoint for two weeks, fix violations, then switch to enforce mode.

HSTS on a site that still alternates between HTTP and HTTPS. If part of the site loads over HTTP, the browser blocks everything after the first HTTPS visit. Make sure the entire site, including assets, is on HTTPS before enabling HSTS.

The duplicate header. Configured both in WordPress via a plugin and in Apache. The browser receives two values, often contradictory, and applies unpredictable behaviour. Centralise the configuration in one place.

X-Frame-Options without frame-ancestors CSP. X-Frame-Options alone is deprecated in newer browsers. Set both to cover old and new clients.

Referrer-Policy too permissive. The default in many frameworks is no-referrer-when-downgrade, which leaks full URLs. Switch to strict-origin-when-cross-origin. This is also a data minimisation measure under the GDPR.

Our free scanner tests these six headers alongside the other GDPR checks. For a targeted header-only test, use the tool at the top of this page.

Frequently asked questions

What are HTTP security headers?

HTTP security headers are response headers that your web server sends to browsers. They instruct the browser on how to behave when handling your site's content, blocking attacks like XSS and clickjacking.

Why is my site getting an F grade?

An F grade means most recommended security headers are missing. This is common for sites using default server configurations. Adding headers usually takes a few minutes of server configuration.

How do I add security headers to my site?

The method depends on your hosting. For Apache use .htaccess, for Nginx use the server block config, for Vercel or Netlify use their headers config file. Most CDNs also let you add headers.

Does adding security headers slow down my website?

No. Security headers add a negligible amount of data to each response, typically less than 500 bytes. They have no measurable impact on page load speed.

Is Content-Security-Policy difficult to set up?

CSP can be complex for sites with many third-party scripts. Start with report-only mode to see what would be blocked before enforcing. A basic policy is straightforward to set up.

Do security headers affect SEO?

Indirectly yes. Google favours HTTPS sites and HSTS ensures HTTPS is always used. A secure site also builds user trust, reducing bounce rates which can improve rankings.

How often should I check my security headers?

Check after every deployment or server configuration change. Headers can be accidentally removed during updates. Regular monitoring catches regressions before attackers do.

Security is just one piece of the puzzle

Your security headers score tells part of the story. We also check cookie consent, GDPR compliance, accessibility and 120+ other compliance points.

Run free website scan