What is a CDN? Content delivery networks explained
How content delivery networks make websites faster and more resilient, what caching means, and how to set up a CDN without breaking your site.
What HTTP security headers do, which ones every website should have, how to set them up without breaking features, and how to test them.
Security headers are instructions your server sends with every page, telling browsers how to behave more safely: always use HTTPS, don't let other sites frame your pages, don't guess file types, limit what scripts can run and restrict access to device features. They're quick to add, cost nothing and close off several common attacks. Content Security Policy needs careful testing so it doesn't block legitimate features.
When a browser loads your website, your server sends HTTP headers alongside the page. Some of these headers tell the browser to enable extra security protections. They don't replace secure code, updates and good passwords, but they add a valuable layer of defence.
Tells browsers to only connect to your site over HTTPS for a set period, even if someone types "http." This prevents downgrade attacks on public networks. Enable it once your whole site works properly over HTTPS. Adding the "includeSubDomains" option covers subdomains too, so make sure they all support HTTPS first. If you're seeing HTTPS errors, read our guide to fixing mixed content warnings.
The most powerful header. It tells the browser which sources of scripts, styles, images, fonts and other content are allowed. A good CSP makes cross-site scripting attacks much harder, because injected scripts from unapproved sources won't run.
CSP takes care to set up because modern sites load content from many places: analytics, chat widgets, payment providers, fonts and video. A policy that's too strict breaks features; one that's too loose provides little protection.
Set to "nosniff," this stops browsers guessing the type of a file, which prevents certain attacks where an uploaded file is treated as a script.
Prevents other sites embedding your pages in frames, which protects against clickjacking, where users are tricked into clicking hidden buttons. Use the CSP "frame-ancestors" directive, and the older X-Frame-Options header for wider compatibility.
Controls how much information about the previous page is sent when visitors click links. A setting like "strict-origin-when-cross-origin" protects sensitive URL details while keeping useful analytics.
Restricts which browser features your site and embedded content can use, such as camera, microphone, geolocation and payment. Turn off anything you don't use.
Depending on your setup:
Free online scanners check which headers your site sends and grade the configuration. Browser developer tools also show headers for each request. Test key pages, including forms, checkout and logins, after any change.
If you're starting from nothing, a reasonable first step is HSTS (once HTTPS is solid everywhere), X-Content-Type-Options set to nosniff, frame protection, a sensible Referrer-Policy and a Permissions-Policy that disables unused features. Then work on Content Security Policy in report-only mode. Keeping third-party scripts to a minimum makes CSP much easier; our guide to privacy-friendly analytics shows one way to reduce them.
Security headers complement, but don't replace, keeping software updated, strong authentication, secure coding, backups and monitoring. Think of them as seatbelts: essential, cheap and most effective alongside everything else.
Every site our web development team builds ships with security headers configured and tested. Our maintenance plans review headers when tools change, and our web app team implements CSP, secure cookies and other protections in custom applications.
Not directly, but they protect your site and users, and HTTPS enforcement supports trust signals.
Content Security Policy can block legitimate scripts if set too strictly. Use report-only mode first and test carefully.
HSTS and a well-configured Content Security Policy provide the most protection, alongside basic headers like X-Content-Type-Options.
This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.
Tell us about your project and get a free, fixed quote.
Get a free quoteHow content delivery networks make websites faster and more resilient, what caching means, and how to set up a CDN without breaking your site.
What mixed content is, why browsers block it, and how to find and fix insecure images, scripts and links so your site shows as fully secure.
What the Jamstack approach is, how pre-built pages and APIs make sites faster and more secure, and when it's the right choice for a business website.