Skip to content

WordPress security headers

A header is a short note sent with the response. The visitor never sees it, the browser reads it and changes what the page is allowed to do.

Security Headers add-on in BotBlocker Security

What WordPress security headers do

Headers describe the page to the browser. They never touch the traffic.

What is missing without the notes

WordPress security headers do not block a request. A crawler never reads them and a script never obeys them. They change what a browser allows on your pages: a login form inside a hidden frame on another site, a script from a host you never chose, an old picture served over plain HTTP.

Without the notes the browser decides on its own. It guesses file types from the first bytes, passes the full address of your page to every site a visitor clicks, and lets any other site wrap your checkout in a frame. None of this appears in a traffic log, and a header scanner reports the gap too.

Four groups you can switch apart

Basic set

Five long-standing rules: framing, type sniffing, referrer, the retired XSS filter and the old cross-domain policy file.

HSTS

Pins HTTPS for a year after the first response. Safe only when the certificate renews by itself and every subdomain answers over HTTPS.

Content-Security-Policy

The list of sources for scripts, styles, frames and forms. The strictest group, and the one most likely to break a page.

Permissions and COOP

Turns off camera, microphone, location and browser payment. Keeps your tab apart from other sites.

Where the notes land

Activation drops a small helper into the must-use folder, so the rules exist before ordinary plugins load. Every normal answer carries them: public pages, the admin area, the login screen and REST responses. Deactivation removes the helper again.

BotBlocker check and block pages keep their own output and skip the set. Background requests and scheduled tasks skip it too, because no browser reads them. The admin area gets a looser CSP list so the editor keeps working.

Cached pages keep the stored set, so an answer served before WordPress starts arrives with the same rules. HSTS goes out only when the site answers over HTTPS: a rule pinned to a missing certificate locks visitors out for a year.

Settings that decide the outcome

Report-Only first

CSP debug mode blocks nothing and writes each refused item to the browser console. Read the console, add what you need, then go live.

Allowed Domains

One domain per line for analytics, chat, maps or payment scripts. Each entry is trusted fully, so keep the list short.

One owner per header

The add-on steps aside when a known header plugin is active and names it in a warning. Two sources for one rule produce a response a browser cannot reconcile.

A test that reads the live page

The panel has a test button that fetches the live page and compares the response with the saved switches. Each group comes back with Keep or Disable and a reason: the server already sends this header, a duplicate HSTS exists, an existing CSP uses unsafe evaluation, or the connection is not HTTPS.

The test changes nothing. It finds the second owner before two rules fight, and it catches the reverse case, a switch the panel shows as off while the site sends the header anyway. That happens until the panel is saved once.

Two limits matter. A staging copy inherits the settings with the database, and without HTTPS it can break on HSTS or CSP. A header scanner that lands on the check page grades the wrong document, so allow it as a bot first.

One of hundreds of BotBlocker capabilities

This add-on covers one job. The core plugin brings the firewall, the visitor check, the login rules and the log; PRO features extend them further. Install BotBlocker, turn on what your site needs and leave the rest off.

BotBlocker protection shield

Questions about headers

Do security headers stop bots?
No. A bot is not a browser and follows no rules. The firewall handles bad traffic; this add-on protects the people who read your pages.
Will CSP break my shop?
It can. A payment, chat or ad script is refused until its domain is on the list. Run Report-Only, open the cart and read the console before you enforce anything.
The site no longer opens over plain HTTP. Is that a fault?
That is HSTS working. Fix the certificate rather than the switch: browsers that received the rule remember it for a year.
The panel says a group is off, but the page carries it.
The add-on has no stored values until the panel is saved once, and then it treats most switches as on. Save and the site follows what you see.
A header scanner gives my site a poor grade.
The scanner probably reached the check page instead of a real page. Find it in the reports, add its address to the allowed bots list, and read the OWASP secure headers project for rule definitions.