How to Check Missing Security Headers on Your Website
When a website is exposed to the public, the first thing most site owners think about is content and design. Security often comes later, after a breach or a warning from a browser. Missing HTTP security headers are a common blind spot that can leave a site vulnerable to click‑jacking, cross‑site scripting, and other attacks. If you’ve ever typed “how to check security headers on my website” into a search engine, you’re probably looking for a straightforward way to identify which headers are absent and how to add them.
In this guide we’ll walk through:
By the end you’ll have a clear, actionable plan to harden your site’s HTTP response and improve its standing with browsers and security scanners.
---
Why Security Headers Matter
Security headers are part of the HTTP response that instruct browsers how to handle the content they receive. Unlike encryption (TLS) or authentication mechanisms, these headers are lightweight directives that can block common attack vectors without changing your site’s code.
| Header | Primary Protection | Typical Value |
|--------|-------------------|----------------|
| Content‑Security‑Policy (CSP) | Mitigates XSS and data injection | default-src 'self'; |
| X‑Frame‑Options | Prevents click‑jacking | DENY or SAMEORIGIN |
| X‑Content‑Type‑Options | Stops MIME‑type sniffing | nosniff |
| Referrer‑Policy | Controls referrer data sent to other sites | strict-origin-when-cross-origin |
| Strict‑Transport‑Security (HSTS) | Forces HTTPS connections | max-age=31536000; includeSubDomains |
| Permissions‑Policy | Restricts use of browser features | geolocation=() |
| Expect‑CT | Enforces Certificate Transparency | max-age=86400, enforce |
If any of these are missing, browsers fall back to default, less‑secure behavior. That can lead to warnings in Chrome’s console, reduced SEO rankings, and, more importantly, exposure to exploit techniques that are otherwise easy to block.
---
How to Check Security Headers on My Website – Quick Methods
1. Using Browser Developer Tools
Most modern browsers let you inspect response headers without leaving the page.
You’ll see a list of all headers sent by the server. If you don’t see the ones from the table above, they’re missing.
Pros: No installation required.
Cons: Manual, only shows one page at a time, and you have to repeat for each endpoint.
2. Curl Command (Command‑Line)
For developers comfortable with a terminal, curl offers a fast way to fetch headers:
`bash
curl -I https://example.com
`
The -I flag tells curl to perform a HEAD request and print only the response headers. Look for the security header names in the output.
You can also pipe the result into grep to filter:
`bash
curl -I https://example.com | grep -i "content-security-policy"
`
Pros: Scriptable, works on any OS with curl.
Cons: Only checks a single URL; you need to run it for each sub‑page or API endpoint you care about.
3. Online Header Checkers
If you prefer a visual report, there are several free web‑based tools. One that aligns perfectly with our needs is the Korrali Web Security Headers Checker. By entering your domain, the service performs a full request, follows redirects, and returns a concise list of present and missing headers.
Steps:
https://example.com). The tool also shows redirect chains, TLS/SSL details, and page metadata, giving a broader view of your site’s health.
Pros: No installation, handles redirects, provides actionable suggestions.
Cons: Relies on an external service; may have rate limits for very large scans.
4. Automated Scanners (CI/CD Integration)
For agencies that need to monitor many client sites, integrating a header check into a CI pipeline can catch regressions early. Tools like OWASP ZAP or Nikto have modules to validate response headers. While setting them up requires more effort, the payoff is continuous compliance.
Pros: Automated, works across many sites, can be combined with other security tests.
Cons: Requires configuration and maintenance.
---
Interpreting the Results – Prioritising Fixes
Not all headers carry the same weight. Here’s a quick guide to decide what to fix first:
When you receive a report from the Korrali checker, note which headers are missing, then follow the order above to address them systematically.
---
Adding Missing Headers – Practical Steps
Below are configuration snippets for the most common web servers. Replace example.com with your domain and adjust values to match your security policy.
Apache (httpd.conf or .htaccess)
`apache
Enforce HTTPS
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Prevent click‑jacking
Header always set X-Frame-Options "DENY"
Stop MIME sniffing
Header always set X-Content-Type-Options "nosniff"
Referrer policy
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Permissions policy (example: disable geolocation)
Header always set Permissions-Policy "geolocation=()"
Content Security Policy (report‑only first)
Header always set Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' https://apis.google.com; object-src 'none'; report-uri https://example.com/csp-report"
`
Place these directives in the appropriate virtual host block or .htaccess file. After saving, reload Apache:
`bash
sudo systemctl reload apache2
`
Nginx (nginx.conf or site‑specific file)
`nginx
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=()" always;
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' https://apis.google.com; object-src 'none'; report-uri https://example.com/csp-report" always;
`
Reload Nginx to apply:
`bash
sudo nginx -s reload
`
Cloud Platforms (AWS CloudFront, Azure Front Door, Cloudflare)
Most CDN or edge platforms allow you to add custom response headers via their UI.
When using a CDN, ensure that the headers are not stripped by the origin server. Test the final response with the Korrali checker to confirm they are present after the CDN layer.
---
Verifying the Fixes
After updating configuration, repeat the check:
curl -I https://example.com or use the browser dev tools to see the new headers. If a header still doesn’t appear, double‑check:
---
Ongoing Monitoring
Security headers can be unintentionally removed when you update server software, change a CDN configuration, or deploy a new application version. Setting up regular monitoring prevents regression.
curl for each site and compares the output against a baseline file. ---
Conclusion
Checking and fixing missing security headers is a low‑cost, high‑impact step to protect your website. By using simple tools—browser dev panels, curl, or the free Korrali Web Security Headers Checker—you can quickly identify gaps. Then, follow the server‑specific snippets to add the missing directives, verify the changes, and put a monitoring process in place to keep the headers intact over time.
Secure headers are part of a broader security posture that also includes TLS configuration, regular vulnerability scanning, and safe coding practices. Treat them as a baseline requirement; once they’re in place, you’ll have one less avenue for attackers to exploit.
Ready to see which headers your site is missing? Check your website free at [web.korrali.com](https://web.korrali.com/checkers/security-headers-checker) and start tightening your HTTP response today.