← BLOG
ENGINEERING · 28 OCT 2026

The config file your host never reads

Our repository ships three different host configurations. On the host we actually run, two of them do nothing at all. That is fine when it is deliberate, and quietly expensive when it is not.

The config file your host never reads

The gald.ai repository contains three files that configure a web server: `_headers` and `_redirects`, which are Netlify and Cloudflare Pages formats, and `.htaccess`, which is Apache. We deploy to Apache. Two of those three files are inert. They sit in the folder, they get deployed with everything else, and the server never opens them.

We keep them on purpose, so that moving back to Netlify or Cloudflare is a drag-and-drop instead of a rewrite. But that only works because we know which one is live. The failure we care about is the inverse: a site where somebody wrote the security headers in the file the host ignores, and nobody noticed, because a config file that is never read does not throw an error. The pages load. The site looks exactly the same as a correctly configured one.

The repo is not the response

Most deploy problems announce themselves. A broken template 500s. A missing asset shows up as a 404 in the console. Server configuration is different: the whole point of it is to be invisible when it works, so it is also invisible when it does not. Nothing in your editor tells you that the host read your file.

What goes missing is rarely dramatic on day one. Your security headers are absent, so the browser falls back to defaults. Your cache policy never applies, so visitors re-download the stylesheet on every page, or worse, a stale HTML page is served for hours after you push a fix. Your pretty URLs do not resolve, so the link you put in an email goes to a 404 while the same page works fine with the .html on the end.

Check the live response, not the file

The only source of truth is what the server actually sends back. Ask it directly with curl -I against the production URL, or open the Network tab in your browser, click the document request and read the response headers. Two minutes, after every deploy that touches configuration, and especially after a host migration.

  • Pick one header you expect to be set and confirm it is present on the live URL, not on localhost.
  • Request a path without the file extension and confirm it resolves instead of 404ing.
  • Request a static asset and read its cache lifetime; then request the HTML page and confirm its lifetime is short.
  • Request something that should never be public, like a README or a build script, and confirm the server refuses it.
  • Change one header deliberately, deploy, and verify it changed. If it did not, you have found the file nobody reads.
WITHOUT
  • Header written in the repo
  • Pages load, so it works
  • Verified on localhost
WITH
  • curl -I on the live URL
  • Read the response headers
  • Change one header, deploy, confirm
The file is a guess. The response is the proof.

That last one is the real test. Anything can look right by accident. Only a deliberate change proves which file is in charge.

What correct looks like

One file is authoritative per host, and everybody on the project can name it. The others, if you keep them for portability, are labelled in the README as inert, with a line saying what they would do elsewhere. Our README says exactly that about `_headers` and `_redirects`, which is the only reason the arrangement is safe rather than confusing.

A migration is not finished when the pages load. It is finished when the headers and the redirects match what they were before.

For an owner rather than an engineer, the question to ask your developer is short: on this host, which file sets our redirects and security headers, and can you show me the live response proving it is applied? If the answer is a file path with no verification behind it, the answer is a guess. The cost of checking is a couple of minutes. The cost of not checking is months of missing headers, broken shared links, and a cache policy that exists only in a text file nobody has ever read.

Have a project in mind?

Start a project