Analyze a URL for CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy headers with graded security feedback.
Security Grade
100/100
9
Headers
11
Passed
0
Issues
HSTS enabled
Force HTTPS via Strict-Transport-Security
HSTS ≥ 1 year
Max-age should be at least 1 year (31536000)
X-Frame-Options set
Prevent clickjacking attacks
X-Content-Type-Options
Prevent MIME-type sniffing
Referrer-Policy set
Control referrer information leakage
CSP enabled
Content-Security-Policy prevents XSS
CSP object-src none
Disable plugin execution
CSP frame-src restricted
Restrict framing sources
Permissions-Policy set
Browser feature permissions defined
No X-XSS-Protection
X-XSS-Protection is deprecated and can cause issues
CSP upgrade-insecure
Upgrade insecure HTTP sub-resources
Cross-Origin Opener
Isolate browsing context for SharedArrayBuffer
max-age=31536000; includeSubDomains
DENY
nosniff
strict-origin-when-cross-origin
default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self'; frame-src 'none'; object-src 'none'; media-src 'self'; worker-src 'self'; form-action 'self'; base-uri 'self'; upgrade-insecure-requests
camera=(), microphone=(), geolocation=(), payment=(), usb=(), fullscreen=(self), bluetooth=(), accelerometer=(), ambient-light-sensor=(), gyroscope=(), magnetometer=(), xr-spatial-tracking=()
same-origin
off
noopen
# Add inside your server {} or location {} block
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 Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self'; frame-src 'none'; object-src 'none'; media-src 'self'; worker-src 'self'; form-action 'self'; base-uri 'self'; upgrade-insecure-requests" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), fullscreen=(self), bluetooth=(), accelerometer=(), ambient-light-sensor=(), gyroscope=(), magnetometer=(), xr-spatial-tracking=()" always;
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header X-DNS-Prefetch-Control "off" always;
add_header X-Download-Options "noopen" always;The HTTP Security Headers Analyzer checks any publicly accessible URL and evaluates the presence, correctness, and strength of its security-related HTTP response headers. Get instant feedback on Content-Security-Policy (CSP), HTTP Strict Transport Security (HSTS), X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy. Each header is graded with clear pass/warn/fail indicators and actionable recommendations so you can harden your web application against common browser-based attacks.
QWhat is the most important security header to implement?
Content-Security-Policy and HSTS are typically considered the most impactful. CSP mitigates XSS attacks, while HSTS ensures all communication uses HTTPS and prevents SSL stripping attacks.
QWill adding these headers break my website?
A strict CSP can break sites that load scripts or styles from unlisted sources. Always test security headers in a staging environment and use CSP report-only mode before enforcing.
QHow do I add security headers to my website?
Headers can be set in your web server configuration (Nginx, Apache), application middleware (Express, Django), CDN edge rules, or meta http-equiv tags (limited support).
QWhy does the tool show a warning for my existing CSP?
Common warnings include use of 'unsafe-inline' or 'unsafe-eval' in script-src, which partially defeat XSS protection. The tool explains each warning and suggests nonce-based or hash-based alternatives.