Your site's functions can now remember things: a key-value store for every site, on Pro and Team.Build an app with sign-in

Writing

Things worth knowing before you pick a host.

Two kinds of page. One answers a question people actually search for, in enough detail to be the last page they open. The other is how this service is built, including the parts we got wrong first and the numbers that made us change our minds.

Guides

Written to be the page that ends the search, whichever host you end up on. Every one of them names what to do on Netlify, Vercel, Cloudflare Pages and GitHub Pages as well as here.

  • How to add an RSS feed to a static site

    An RSS feed is one XML file that lists your latest posts, regenerated every time the site is built — Hugo writes it for you, Jekyll, Eleventy and Astro need one plugin, and a hand-written site needs a short script. What goes in it, how readers find it, and the validator errors you will meet first.

  • How to add analytics to a static site

    A static site has no server code of yours, but every page view still reaches someone's server — so you can count visitors with a script in the page, with your host's own analytics, or by reading the access log. What each one sees, why their numbers rarely match, and what to check when the dashboard stays empty.

  • How to self-host Google Fonts on a static site

    Self-hosting a Google Font is a few WOFF2 files and an @font-face rule for each — but the CSS you copy depends on which browser asked, preloading has a CORS trap, and a font on another domain needs a header. How to do it on any static host, and when to leave the font on Google.

  • How to optimize images on a static site, without a build pipeline

    Four separate problems hide behind "optimize your images" — too many pixels, the wrong format, no reserved space, and the wrong loading order. The HTML that fixes each on any static host, which hosts resize for you, and when to skip all of it.

  • How to add search to a static site

    A static site has no server to run a query, so the search index has to be a file — built from your pages after every build and searched in the browser, or kept by someone else's service. Four ways to do it, what each one needs, and the three mistakes that leave pages out of the results.

  • How to add a custom 404 page to a static site

    Put a file named 404.html at the root of what you publish and most static hosts serve it for any missing path. Where each host looks for it, how to check it answers with a 404 and not a 200, and the two things that quietly break it — relative links and an SPA fallback.

  • Custom headers on a static site: where each host lets you set them

    A response header such as Content-Security-Policy or Access-Control-Allow-Origin is sent by the server, not written in your pages — so on a static host you set it in a file the host reads. Where that file is on six hosts, which headers a meta tag can stand in for, and why a header that works on your pages goes missing on a 404.

  • How to store data on a static site

    A static site can keep data in six places — the visitor's browser, its own files, a form backend, a database the browser calls directly, a function in front of a database, or storage the host runs. Which one depends on who has to see the data, and who is allowed to change it.

  • Favicon not showing on your site: where the browser actually looks

    A browser reads a site's icon from a link tag, and may fall back to /favicon.ico at the root of the origin. Why each lookup misses after a deploy, three requests that tell you which, and what phones and Google ask for separately.

  • Trailing slash on a static site: /about or /about/?

    /about and /about/ are two different URLs, and which one a static site answers depends on whether the page is a file or a folder — and on the host. Why it breaks relative links, and what each host documents.

  • Redirects on a static site: moving pages without breaking links

    Moved a page, renamed a folder or changed domain? A permanent redirect from every old address to its new one keeps links and search working. Where you write it depends on the host — and the same line means 301 on one host and 302 on another, and is ignored on a third if the old file is still there.

  • Why your site isn't showing up on Google

    When a search for your site finds nothing, it is almost always not in Google's index yet — not ranked badly. Google hasn't found it, something is telling Google to stay away, or Google looked and passed. The URL Inspection tool tells you which, and the fix for each is different.

  • The page an AI wrote works in the chat, and is blank when you open the file

    The preview in the chat runs the page on a web server and hands it the libraries it imports. A double-clicked file gets neither. The first red line in the browser console says which one is missing, and each has a fix that takes a minute.

  • Why the preview doesn't show when you share your link

    When you paste a link, a bot fetches the raw HTML once, reads a few tags from the head, and caches what it saw. It runs no JavaScript and has none of your cookies. Most missing previews come from one of those facts — and the fix is the tag, then making the platform look again.

  • Your site works locally but breaks after you deploy it

    The deployed page is asking for files at addresses where they do not exist. Open the Network tab, find the first request that failed, compare the address it asked for with where the file really is — and the cause is one of a handful, each with a fix that takes a minute.

  • How to call an API from a static site without shipping the key

    Anything in a static site's files is public, environment variables included. The key has to live one hop away, in something that adds it to the call — and on most hosts that is one config block or a fifteen-line function.

  • From first draft to client sign-off: the review loop with an AI agent

    An AI agent can build the site, publish it, read what the client says about it, fix it and answer — if the address never changes, the comments sit on the page, and the agent treats them as requests rather than orders.

  • Sending a client a ChatGPT or Claude share link: what they actually see

    A share link sends the client the conversation, not the work. What each kind of link shows, who can open it, and when the vendor's own publish button is the better thing to send.

  • Your site still shows the old version after you deployed

    The files are on the host. Something between the host and the eye kept a copy — and there are five candidates, only one of which "clear your browser cache" clears.

  • Pointing a custom domain at a static site

    One record points the name, one proves you own it, and a certificate follows. The apex is the hard case, Cloudflare-hosted domains have a trap of their own, and "wait for propagation" is not a diagnosis.

  • Why your static site 404s when you refresh

    The router owns the URL in the browser. The server has never heard of it. One rule fixes it, and the status code that rule returns is the part most guides get wrong.

  • What "static" actually means

    A static site is one where every visitor gets the same file. That rules in more than people expect, rules out a few things that look harmless, and the difference is worth knowing before you pick a host.

How this is built

Architecture, measurements and mistakes. Nothing here is a product announcement — if a post has a number in it, the number came from a document that was written before the decision rather than after it.

  • Our tenant-isolation test passed with tenant isolation removed

    Removing the site id from our cache key once left every test green. Two tests fixed that in August. Writing this post found something worse: the test named after the exact attack had been catching it only because of the order the tests ran in.

  • Running other people's code on the edge that serves their sites

    A static host that starts running its customers' code inherits every problem of a shared domain at once. How functions were built here — one isolate per deploy, a gateway in front of every fetch, headers rewritten on the way out — and what we measured before writing any of it.

  • A redeploy that changed three files used to cost 20,040 operations

    Republishing a 20,000-file site with three files changed used to cost 20,040 storage operations. It now costs four. The interesting part is not the ratio — it is that the ratio was the wrong reason to do it.

  • The API can go down without taking the sites with it

    The API can be down and every site we host keeps serving. That is not redundancy — it is a rule about which system is allowed to be on the path of a request, enforced by the order writes happen in.

  • Why user content never shares a domain with the dashboard

    GitHub serves pages on github.io, not on github.com. Netlify uses netlify.app, not netlify.com. It looks like branding. It is a cookie boundary, and getting it wrong hands your dashboard to anyone who can upload a file.

Or skip the reading.

Drag a folder in and you have an HTTPS link. Everything above is optional.