Clarity as standard. Start a conversation

Plain-English guide

Content Security Policy in plain English

A modern small business website pulls in pieces from all over the place: a booking widget from one company, a map from another, fonts, analytics, a chat bubble, a video player. Each of those is code running on your page, in your customer's browser, under your name. A Content Security Policy is the guest list. It tells the browser which sources are welcome, and quietly turns away anything that is not on it.

By Matt Rooney · 17/11/2026 · T19 Digital · 5 min read

The short version

  • A Content Security Policy lists the places your pages may load code from.
  • Anything not on the list is refused by the browser, limiting the damage of injected code.
  • A policy must match what your site really uses, or it breaks things.

The guest list idea

Every page tells the browser to fetch a collection of extra pieces: scripts that make menus and forms work, style sheets that control the look, fonts, images, frames holding a map or a video. Without a policy, the browser fetches whatever the page asks for, from wherever it asks. That is convenient, and it is also how unwanted code can slip in if any part of the site is ever tampered with.

A Content Security Policy is a header your server sends with the page, listing the approved sources for each type of content. Scripts from your own site and your booking provider, say; fonts from your font host; frames from your map provider. If the page then tries to load a script from somewhere not on the list, the browser declines and carries on without it.

It is a bouncer with a printed list rather than a judge of character. It does not inspect what an approved source sends. It simply refuses anything from an address you did not name, which turns out to be very useful when something unexpected appears on a page.

What it protects your customers from

The main risk a policy addresses is someone managing to slip their own script into your page. That can happen through an outdated plugin, a weak form that stores what people type and shows it back, or a compromised third-party service. Once foreign code is running on your page, it can do a great deal: alter what the page shows, read what a customer types into a form, or send visitors somewhere they did not intend to go.

A well set policy means that, even if such code makes it into the page, the browser refuses to run it because it does not come from an approved place, or refuses to send data to an unapproved destination. The weakness that let it in still needs fixing, but the harm to your visitors is far smaller in the meantime. That is the essence of the policy: a second line of defence that assumes the first may one day fail.

Why policies break things when set carelessly

The difficulty is that a policy has to describe your site accurately. Most small sites have more sources than their owners realise. The booking widget may load its own scripts from two or three addresses. The analytics tool may fetch something from a separate domain. A video embed brings its own collection. Leave any of those off the list and the browser blocks them, so the calendar stops appearing or the form silently fails.

That is why copying a policy from another site, or from a generic example, rarely works. It either lets in so much that it protects nothing, or blocks pieces your business depends on. A policy is written by looking at what your pages actually load, deciding which of those are legitimate, and then testing the result carefully on every page that matters.

There is a useful halfway house. A policy can be set to report what it would block without blocking anything yet. Running in that mode for a while shows exactly which sources a site uses in real life, so the final list can be trusted before it is switched on in earnest.

What our check reads

On its single visit to your home page, the check notes whether a Content Security Policy is present and whether it looks meaningful, rather than one so loose it allows practically anything. It does not try to break the policy or test it with harmful code; the scan is passive and never sends anything of that kind.

A missing policy is common on small business sites and usually appears as a medium or minor finding. It does not mean anything is wrong today. It means the browser has no instructions to fall back on if something goes wrong later, and on a site taking enquiries, bookings or payments that is a gap worth closing when the site is next being worked on.

An example: a music teacher in Durham

Imagine a piano and guitar teacher in Durham whose site lets parents book trial lessons through an embedded booking widget, shows a couple of performance videos, and carries a small chat bubble for quick questions. The check comes back with no serious findings, and among the medium ones is a missing Content Security Policy.

In the private conversation, the sensible approach is not to fire a strict policy straight onto the live site. Instead the sources are listed: her own site, the booking provider, the video host, the chat service and the analytics tool. The policy is drafted around those, run in report-only mode for a short while to catch anything missed, then switched on properly.

Parents notice nothing at all, which is the right outcome. What changes is that if any of those services were ever compromised, or a script appeared on her page that she never put there, the browser would refuse to run it.

When a policy can wait, and taking the next step

If your site has serious findings, such as software years out of date, fix those before worrying about a policy. And on a very simple site with no forms, no logins and no third-party scripts, a policy adds less, so it can wait for the next round of work. If your site sits on a hosted builder, you may have limited control over headers anyway, which is worth knowing before spending money.

The free check takes about thirty seconds and shows whether a policy is in place. If it needs adding alongside other fixes, our Security fix starts from £295 + VAT at a price agreed before any work, and finishes with a re-scan. Once it is set, a care plan from £29 a month + VAT for a website keeps the policy in step as you add new tools to the site.

Questions we get on this

Will a Content Security Policy stop my site being hacked?

Not on its own. It limits what injected code can do in a visitor's browser, which reduces the harm if something goes wrong. Keeping software up to date and using strong passwords are still what stop most break-ins in the first place.

Why did my booking form stop working after a policy was added?

Almost certainly because one of the sources the form relies on was left off the list. The browser blocked it as instructed. Adding the missing source, after checking it is genuine, usually puts things right straight away.

Do I need to change the policy when I add a new tool?

Usually, yes. A new widget, chat service or analytics tool may load from addresses the policy does not yet allow. It is worth telling whoever manages the site before adding anything, so the policy can be updated at the same time.

Can I see whether my site has a policy myself?

Yes, with your browser's developer tools you can look at the headers your pages send. The simpler route for most owners is to run our free check, which reads them for you in about thirty seconds.

Three things like this, once a month

What actually changed for small businesses in tech, what to do about it, and the guides we publish. No pitch, and you can leave with one click.

Check your own website

A free, passive scan of your home page and public DNS records. You get a score in about thirty seconds.