# Security Headers for WordPress

> Send HTTP security headers such as X-Frame-Options, Referrer-Policy, Permissions-Policy, HSTS and Content-Security-Policy. Part of Toggleworks, one plugin…

TW-SEC-14 Security


Send HTTP security headers such as X-Frame-Options, Referrer-Policy, Permissions-Policy, HSTS and Content-Security-Policy.

[Get it from $26 a year](https://togglework.app/pricing/#plans) [Try it in the demo](https://togglework.app/demo/)

Security Headers

**Part number**
: TW-SEC-14
**Section**
: [Security](https://togglework.app/features/security/)
**Settings**
: 11 (6 on/off)
**Starts**
: Switched off
**In plans**
: Every plan

## Why it matters

Security headers are short instructions your server sends with every page, telling the browser how to treat it: don’t let other sites frame this page, don’t guess file types, always use HTTPS, only run scripts from these places. They protect your visitors from clickjacking, content sniffing and some kinds of injected scripts.

They cost nothing in speed and are a standard item on security audits and scanners like securityheaders.com.

### What it does

- X-Content-Type-Options: nosniff and X-Frame-Options (SAMEORIGIN by default).
- Referrer-Policy and Permissions-Policy (camera, microphone and location off by default).
- Strict-Transport-Security (HSTS) with max-age, includeSubDomains and preload options.
- Content-Security-Policy, with a report-only mode for testing.

![Security Headers settings screen in the Toggleworks WordPress plugin, showing X-Content-Type-Options: nosniff, X-Frame-Options (front end), Referrer-Policy, Permissions-Policy](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-security-headers.webp?v=1795524238)

The Security Headers screen in wp-admin, where you switch it on and change its settings.

## Set it up

1. Switch Security Headers on. The safe headers are on by default.
2. For HSTS, confirm HTTPS works everywhere, then turn it on with a short max-age (300) to test before using a year.
3. For a Content-Security-Policy, start in report-only mode and watch the browser console for a week before enforcing.

## What you can set

Switch Security Headers on in Toggleworks → Security, then adjust any of these. Each one starts with a default, so you can switch the part on first and fine-tune later.

- X-Content-Type-Options: nosniff
- X-Frame-Options (front end)
- Referrer-Policy
- Permissions-Policy
- Send HSTS
- max-age (seconds)
- includeSubDomains
- preload
- Policy
- Report only (do not block)
- Also send the policy in wp-admin and on the login page

## Good to know

- HSTS is remembered by browsers for the whole max-age. Don’t include subdomains unless every subdomain has HTTPS.
- A strict Content-Security-Policy in wp-admin can break the block editor. It applies to the front end only unless you choose otherwise.

[Guide: The WordPress security checklist, in the order that matters](https://togglework.app/guides/wordpress-security-checklist/)

## One less plugin to install

Security Headers does a job people often install a separate plugin for:

- Hardening WordPress settingsOften done with Solid Security

## Comes with 187 more parts

Security Headers is one part of Toggleworks, a single plugin for security, speed, SEO, backups, email and store tools. Switch on what your site needs; the rest stays off and loads nothing.

[All 18 Security parts](https://togglework.app/features/security/)

### People also look for it as

- hsts
- csp
- content security policy
- x-frame-options
- clickjacking
- referrer
- permissions policy
- nosniff
- headers

## Often switched on with it

- [Malware & File Scanner](https://togglework.app/features/security/malware-scanner/) — TW-SEC-12 · Check WordPress core and plugin files against official checksums, find PHP files hidden in uploads, and search code for known… · 2 settings
- [Session Manager](https://togglework.app/features/security/session-manager/) — TW-SEC-15 · See every active login — user, IP, device and when — and log anyone out instantly. Optionally limit how many devices one account… · 6 settings
- [Browser Cache Headers](https://togglework.app/features/performance/page-cache-headers/) — TW-PRF-14 · Let browsers and proxies cache pages for logged-out visitors, and optionally strip ?ver= from asset URLs. · 2 settings
- [Lead Source Tracking](https://togglework.app/features/marketing/utm-tracking/) — TW-MKT-08 · See which campaign, ad or website every lead and order came from: UTM tags, referrer and landing page are saved with form entries… · 2 settings
- [Site Alerts](https://togglework.app/features/marketing/alerts/) — TW-MKT-02 · Email or Slack alerts for plugin and theme changes, new administrators, login lockouts and PHP fatal errors — plus a heartbeat… · 4 settings
- [Activity Log](https://togglework.app/features/security/activity-log/) — TW-SEC-01 · Keep a record of logins, user and role changes, plugin and theme changes, core updates, content changes and key settings. · 2 settings

## Questions

**Is Security Headers included in every Toggleworks plan?**

Yes. Every plan includes all 188 parts, Security Headers among them. Plans differ only in how many sites you can use them on, and staging or local copies of a site don’t count.

**Does Security Headers slow my site down when it’s switched off?**

No. Every part starts switched off, and a part that is off loads none of its code. Switch on Security Headers only if your site needs it.

**What if a setting locks me out?**

Add `define( 'TOGGLEWORKS_SAFE_MODE', true );` to wp-config.php. It pauses every part until you remove the line, and Tools → Recent changes lets you undo a change.

**Can I try Security Headers before I buy?**

Yes. The [live demo](https://togglework.app/demo/) runs a WordPress site with Toggleworks in your browser, and every plan has a 14-day refund.

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/features/security/security-headers/
