The 307 vs 308 Redirect Mistake I Fixed

A 307 and a 308 redirect land a visitor on exactly the same page, yet every machine reading the site takes them to mean opposite things. This piece covers the layer most site owners never test, and why ignoring it is getting more expensive.

Recently I changed a single character in how my own domain behaves. I didn't touch the content, the design or any copy; I changed one digit in an HTTP status code. Anyone visiting the site would have noticed nothing, but every machine that reads the site was now told "this is permanent" where before it had been told "this might be temporary". That gap, between what a person sees and what a machine is told, is where a surprising amount of unnoticed damage lives.

The setup was simple. My personal site has two front doors, the bare domain and the same domain with www in front. A site owner wants only one of them to be the real home and the other to forward to it, which is called canonicalisation, and almost everyone gets the easy half right. The redirect is set up, someone types the bare domain, the browser lands on the www version and the page loads. Most people stop there, because from the only seat they ever sit in, the user's seat, there's nothing left to check.

I stopped there too, for a while. Then I looked at the actual status code the redirect was sending, and it was a 307.

What the user never sees

A 307 is a temporary redirect and a 308 is a permanent one. Both send the visitor to exactly the same place, and the visitor can't tell them apart, because the browser bar ends up on the www address either way. If the only test is whether the page lands in the right place, a 307 and a 308 look identical and the difference never gets caught.

Search engines and AI crawlers read a site differently. They read the status code first and treat it as a statement of intent. A temporary redirect tells them to keep the old address around because it might come back, and to hold off on consolidating anything. So the crawler keeps the bare domain eligible for indexing, and the ranking signal stays split across two addresses that the owner wanted to be one. A permanent redirect tells them the move is final and that everything should fold into the destination, so the signal consolidates onto the canonical address, which is what I'd wanted from the start.

So my redirect was working and wrong at the same time: it moved people correctly and told machines the wrong story. The fix needed no redesign or migration. I changed 307 to 308, one digit, and confirmed that the direction of the redirect was already right, so nothing further down the chain had to move.

Passing your own test proves only half

This part is worth generalising, because it reaches well beyond redirects.

Almost every system a business runs has two audiences: the person in front of it and the machine that reads it on that person's behalf. A website has visitors and crawlers, an API has a frontend and other services calling it, and a document has readers plus the search index that decides whether anyone finds it. People naturally test for the audience they can see and almost never for the one they can't, because everything looks fine from where they're sitting.

The failures that come from this are the worst kind, because they're invisible from the only vantage point the owner habitually uses. The site works, the page loads and nothing throws an error, while the machine layer acts on a signal nobody meant to send. The owner finds out only by deliberately going to look at the layer the machine reads, as a separate act.

That separate act is the whole discipline. Checking that the redirect fires isn't enough; the check has to read the status code it fires. Checking that the page renders isn't enough either; the check has to read what the crawler is told about the page. The visible test and the machine test are two different tests, and passing the first one says nothing about the second.

Why this is getting more expensive

The machine reading a site used to be a search engine, and the cost of a confused signal was a few lost rankings. That cost is rising quickly, because the machine reading the site is more and more often an AI assistant answering a question about its owner.

When someone asks an assistant who I am or where to find my work, the assistant works out my canonical identity from exactly these signals: which address is authoritative, what redirects to what, and how consistently my site states the same facts about itself. Ambiguous canonicalization produces an ambiguous answer. Two addresses that both look half-live give the model two candidates and no clear winner, and a model without a clear winner either guesses or hedges, and I don't want either answer given on my behalf.

So the boring infrastructure layer, the part nobody posts about, now sits directly upstream of how people come across me in the systems that increasingly shape first impressions. The status code has stopped being a webmaster's footnote and become part of how a machine decides what's true about a person.

The operator move

The point I keep coming back to is that a solo operator gets none of an institution's defaults for free, and one of those defaults is the habit of testing the layer customers never see. Big companies employ people whose whole job is the machine-readable surface. In a company of one, that habit gets built deliberately, or the operator ships things that work on the owner's screen and fail without a sound for everyone reading the business through a machine.

The redirect was a small case of a large rule. The afternoon it took to find and fix one digit was cheap. The expensive version is the one where I never look, the signal stays split for months, and I keep wondering why the canonical address isn't consolidating. Learning the lesson that way costs far more than the check would have.

If you run anything online, look at the status code your domain sends, as well as where it lands you. The two can differ, and the difference sits in the part nobody sees.


Anjani Pandey builds autonomous AI systems for operators and small teams.

Pick a time that suits you.

Book a call