Security

A content security policy is in place

security.missing-csp

Why this matters

A content security policy tells the browser which scripts it may run. Without one, anything that manages to get injected into a page — through a compromised plugin, a hijacked advert, or a comment field — runs with the same trust as your own code.

Who fixes it

A developer

Roughly how long

Varies

Care needed

Change carefully

How to fix it

Add a policy in report-only mode first so you can see what it would have blocked without breaking anything, then tighten it once the reports are clean. Doing it the other way round takes sites down.

On your platform

WordPress

A job for whoever runs your hosting rather than for WordPress itself. If Cloudflare sits in front of your site, add it there under Rules → Transform Rules → Modify Response Header; on Apache hosting it can go in `.htaccess`. Either way start with `Content-Security-Policy-Report-Only` and leave it a week: WordPress themes and plugins load scripts from places you will not have predicted, and going straight to the enforcing header is how a site goes blank.

Shopify

You cannot set this on Shopify. Storefront response headers are controlled by Shopify and merchants cannot add or override them — there is nothing in your admin that will change it and no app that can. A gap in the platform rather than a mistake in your shop: worth knowing, not worth your afternoon.

Drupal

Either at the web server, or with the Security Kit (`seckit`) module, which keeps the policy in Drupal's own configuration and is the easier route if you do not control the server. Whichever you pick, use its report-only mode first — Drupal sites tend to pull scripts in from several modules at once, and you want that list before you enforce anything.

Joomla

Joomla 4 and 5 ship a System – HTTP Headers plugin that sets this without touching the server. Enable it and use its content-security-policy settings in report-only mode first, so you can see what would have been blocked. If the plugin is disabled, `.htaccess` is the fallback.

How we score it

Failing this check takes up to 10 points off your security score. It is a fact about your site rather than a measurement, so it reads the same on every scan until you change something.

Does your site pass this one?

This check runs on every scan, along with the other 106. Free, no account, and you see the evidence for each result.

Check my site

Other security checks

See all 107 checks