Free X-XSS-Protection Header Checker (Deprecated)
Detect deprecated X-XSS-Protection headers on your live URL and get step-by-step swaps to a strict CSP with Trusted Types, in 60 seconds.
- Deprecated header check
- Removal guidance
- Modern mitigations

What you get for free
18 core security checks via this tool, passive scans, step-by-step remediation, security score on every result.
What Essential adds at $39/mo
+17 advanced checks, continuous monitoring, daily security score history, email alerts, GitHub SAST, board-ready PDFs, SOC 2 / ISO 27001 / PCI reports.
What to use instead
- Adopt a strict CSP with nonces/hashes
- Enable Trusted Types where supported
- Sanitize/escape user content
Why is X-XSS-Protection deprecated?
It was inconsistent across browsers and created false security signals. Modern defenses rely on CSP, Trusted Types, and proper escaping/sanitization.
Implementation examples
Once you've identified the gap, applying the fix is straightforward. Remove the legacy X-XSS-Protection header and ship a strict Content-Security-Policy in its place. Here are the three configurations developers reach for most often.
Nginx
# Strip the deprecated header if anything upstream still sets it
proxy_hide_header X-XSS-Protection;
add_header X-XSS-Protection "" always;
# Replace it with a strict CSP
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'nonce-$request_id'; object-src 'none'; base-uri 'self'; require-trusted-types-for 'script'" always;
add_header X-Content-Type-Options "nosniff" always;Apache
# Remove the deprecated header
Header always unset X-XSS-Protection
# Replace it with a strict CSP
Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; require-trusted-types-for 'script'"
Header always set X-Content-Type-Options "nosniff"Node.js (Express + Helmet)
import express from "express"
import helmet from "helmet"
const app = express()
// Helmet 5+ disables X-XSS-Protection by default; this makes it explicit
app.use(
helmet({
xXssProtection: false,
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'"],
objectSrc: ["'none'"],
baseUri: ["'self'"],
requireTrustedTypesFor: ["'script'"],
},
},
}),
)Tool-specific questions
Will removing it break anything?
Built for the engineers who already have enough to fix.
Real-time results
Comprehensive checks
Step-by-step fixes
More free checks, for the rest of your surface.
Complete Security Scan
Pre-Pentest Security Scan
Security Compliance Checker
WAF Checker
Security Headers Test
TLS/SSL Security Checker
Frequently asked.
What is Barrion and how does it enhance website security?
How safe is Barrion to use for security testing?
What types of security issues does Barrion identify?
What specific security checks does Barrion perform?
What is Barrion's smart crawling?
How often does Barrion perform security scans?
Is Barrion suitable for security testing of all business sizes?
How does Barrion handle data security and privacy during security testing?
What if I'm not satisfied with Barrion's security testing service?
How does Barrion help with SOC 2, ISO 27001, NIS2, and other compliance frameworks?
Anything else? Email contact@barrion.io.
Run a full report on your site.
Free first scan covers every check, no signup needed. Sign up to save the report and turn on continuous monitoring.