Static Host UK

Security Headers Your AI-Built Site Gets on Day One

An AI builder writes your pages, not the instructions the server sends with them. On our hosting, four of those go out with every response.

By , founder and sysadmin of Static Host UK

I'm Axel Segebrecht. I build privacy-first platforms, advise small businesses on AI governance, and create free tools for the neurodiverse community.

An AI builder can turn a description into a working site. What it doesn’t decide is what the server says when it sends each page. Alongside the HTML, every response carries headers: short instructions telling the browser how to treat what it has received. A handful of them close off attacks that have been well understood for years, and whether your site sends them depends on your host, whatever you typed into the prompt.

On our hosting, every site sends these on every response, with nothing to switch on. Plain http:// requests are redirected to https:// before any of them apply.

Strict-Transport-Security

This tells the browser to use HTTPS for your site from now on, for two years, even when someone types or follows an http:// link. It matters most on public Wi-Fi, where an attacker can catch that first unencrypted request and keep the visitor on a copy of your site that isn’t protected (MDN).

Ours also carries preload, which marks a domain as ready for the list of HTTPS-only sites built into browsers. Getting onto that list is a separate application, made at hstspreload.org.

X-Frame-Options: SAMEORIGIN

This stops other websites from showing your pages inside a frame on theirs. Framing is how clickjacking works: an attacker lays your page, invisibly, over one of their own, and the visitor clicks your buttons while thinking they are clicking theirs. Jeremiah Grossman and Robert Hansen named the technique in 2008, after showing that Adobe Flash Player could be clickjacked (Wikipedia). Your own site can still frame its own pages (MDN).

X-Content-Type-Options: nosniff

Browsers used to guess what a file was from its contents. With nosniff, they believe the type the server states, so a file sent as text or an image is never run as a script because its contents happen to look like one.

Referrer-Policy: strict-origin-when-cross-origin

When a visitor follows a link from your site to someone else’s, the other site learns your domain and nothing more. The full address of the page they came from stays behind, along with anything in it you didn’t mean to share, such as a search term in the query string.

What we don’t set: a Content Security Policy

A Content Security Policy lists the places your pages may load scripts, styles and images from. It is the strongest of these headers and the one most likely to break a site, because the list has to match what the site really uses. AI-built sites often pull in fonts, analytics and widgets from several services, and a policy we guessed at would block some of them without telling anyone.

So the choice is yours. You can add a policy to your pages in a <meta http-equiv="Content-Security-Policy"> tag in the page head, and most of its rules work that way (MDN). Start strict, load every page, and loosen it where something breaks.

Check any site

Mozilla’s HTTP Observatory scores the headers of any public site. Run it on your current site, wherever it is hosted, and again after a move.

Related: why most WordPress vulnerabilities are in plugins.

get started

Ready to Deploy?

Join Jamstack developers across the UK hosting their static sites with privacy and performance built in. Hosting is free for good, no credit card needed, with Plus features when you want them.