Learn how to secure your WordPress site with the HTTP Security Header plugin. Easy setup, enable essential HTTP headers, prevent XSS, clickjacking, and boost your website security in minutes.
HTTP Security Header by Inspired Monks is a powerful WordPress plugin designed to protect your website by adding critical HTTP security headers, hardening your site against common attacks such as XSS, clickjacking, MIME sniffing, and more.
It provides a simple, flexible admin panel to enable, disable, and customize security headers without touching server configuration files manually.
✅ Easy-to-use WordPress Admin UI
✅ Enable/Disable headers individually
✅ Set default or custom header values
✅ Reset settings to default recommendations
✅ Disable all headers with one click
✅ Auto-activate essential headers on activation and updates
✅ Automatic validation of custom header values
✅ Lightweight, no unnecessary overhead
✅ Fully compatible with WP Rocket and major caching plugins
✅ Multisite compatible
Header | Description |
---|---|
Strict-Transport-Security (HSTS) | Enforces secure HTTPS connections |
X-Frame-Options | Protects against clickjacking |
X-Content-Type-Options | Prevents MIME-type sniffing |
Referrer-Policy | Controls referrer information sent by the browser |
Content-Security-Policy (CSP) | Prevents cross-site scripting (XSS) and data injection |
Permissions-Policy | Controls access to browser features like camera, location |
X-XSS-Protection | Cross-site scripting (legacy support) |
X-Permitted-Cross-Domain-Policies | Restricts Adobe Flash cross-domain policy loading |
Expect-CT | Enforces Certificate Transparency |
Cross-Origin-Opener-Policy (COOP) | Isolates browsing contexts |
Cross-Origin-Resource-Policy (CORP) | Controls resource sharing between origins |
Cross-Origin-Embedder-Policy (COEP) | Securely loads cross-origin resources |
This ensures maximum compatibility without breaking your site.
When you go to Settings → Security Headers, you will find:
The plugin automatically validates custom inputs before sending headers:
X-Frame-Options
must be SAMEORIGIN
, DENY
, or start with ALLOW-FROM
.X-Content-Type-Options
must be nosniff
.Referrer-Policy
must contain only lowercase letters and hyphens.Content-Security-Policy
must contain default-src
and 'self'
.Permissions-Policy
must follow a key=value() structure.Expect-CT
must contain max-age=
.same-origin
, cross-origin
, require-corp
, etc.).Invalid custom values will automatically fallback to safe defaults.
Header | Example Custom Value |
---|---|
Strict-Transport-Security (HSTS) | max-age=63072000; includeSubDomains; preload |
X-Frame-Options | SAMEORIGIN or DENY or ALLOW-FROM https://example.com |
X-Content-Type-Options | nosniff |
Referrer-Policy | strict-origin-when-cross-origin |
Content-Security-Policy | default-src 'self'; script-src 'self' https://apis.example.com; style-src 'self' 'unsafe-inline'; |
Permissions-Policy | geolocation=(), microphone=(), camera=(), fullscreen=(self) |
X-XSS-Protection | 1; mode=block |
X-Permitted-Cross-Domain-Policies | none or master-only |
Expect-CT | max-age=86400, enforce, report-uri="https://your-report-collector.com/report" |
Cross-Origin-Opener-Policy | same-origin or same-origin-allow-popups |
Cross-Origin-Resource-Policy | same-origin or cross-origin |
Cross-Origin-Embedder-Policy | require-corp or unsafe-none |
.htaccess
?send_headers
hook).Version | Changes |
---|---|
3.0 | Major update. Auto-activate important headers. Disable advanced headers by default. Validation improvements. "Reset to Default" and "Disable All" functionality. |
2.2 | Improved compatibility with WP Rocket. Optimized CSP. Updated Permissions-Policy. |
2.1 | Added support for Cross-Origin headers. UI Enhancements. |
2.0.3 | Minor fixes. |
2.0.2 | Branding and name updates. |
2.0.1 | Improved dashboard UI, added modern styling. |
2.0 | Initial public release with feature headers support. |
Learn about Cross-Origin-Resource-Policy (CORP) and how it helps secure your website by controlling the sharing of resources across different origins.
Learn how Cross-Origin-Opener-Policy (COOP) helps protect your website from cross-origin attacks. Discover its role in improving web security and how to implement it on your site.
Learn how Feature-Policy helps protect user privacy and enhance web security by controlling browser features. Find out how to implement it on your website.