Scheduled broken-link and redirect checks that tell you the moment a link breaks — linkbruno.com
The documentation is clear if you take it at face value. 301 means "moved permanently". 302 means "found it over there, for now". The trouble is the middle case, which is most of the real work: a campaign page that might be the permanent home, a rebrand you're "pretty sure" about, an A/B test URL, a documentation move you may have to revert after the new IA settles.
Teams pick 302 to stay safe, then forget to change it. Or they pick 301, then spend a quarter undoing caches and search results. Both regret something.
Let's argue about it.
The case for 301, even if you're not 100% sure
Clients and caches will do what you told them. A 301 can be remembered by browsers, CDNs and intermediate proxies for a long time. That is the point, and it is also why people are afraid of it. If the new URL really is the destination, a 302 leaves you with two URLs alive in bookmarks, search, and pasted Slack links, indefinitely.
Search engines treat a long-lived 302 like a 301 anyway. If you leave a 302 in place for months, you often get the permanent-move behaviour without having said so, plus a period of mixed signals. If you already know the old URL is not coming back, a 301 is the honest status.
A 302 is a terrible default for path changes. Trailing slashes, HTTP to HTTPS, www to apex: these are permanent. A 302 here is almost always a mistake, and it is a very common one in "I'll use 302 until we know" configs that then apply to every redirect in the file.
Undoing a 301 is possible. You 301 the other way, you lower TTLs when you can, you wait. It is painful, not impossible. Fear of that pain should not put a temporary status on a URL you have no plan to revive.
The case for 302 until you're sure
A mistaken 301 has a long tail. Bookmarks, crawlers, and some CDNs will skip the old URL for a long time. If the new page is wrong, or the marketing team changes their mind next week, you have trained the web to go to a place you no longer like. A 302 lets you change the destination, or go back, without fighting a cache you do not control.
Some moves really are temporary. A maintenance page, a short outage, a geolocation interstitial, a language picker, an unsold event that might come back. A 301 on any of those is a bug.
"Permanent" is a business decision, not a developer one. If nobody has written down "this slug is retired", the engineer who ships a 301 is guessing. Guessing in the undo-hostile direction is worse.
Testing and staged rollouts. When 10% of traffic should see a new path, or when you are still comparing two destinations, 301 is the wrong tool. You want something reversible until the experiment ends.
Where I've landed
I treat "not sure" as a reason to pause, not as a reason to default to 302.
- If the old URL should never serve content again (a typo, a retired path, HTTP, www, a slash rule), use 301. You are sure, even if the new IA might still change: the old URL is done. If the new destination changes later, update the 301 target; don't keep the old URL alive with a 302.
- If the old URL might need to come back as itself (a seasonal page, a feature flag, a temporary campaign at a pretty path), use 302, and put a review date next to it. A 302 without a review date is how temporary redirects become load-bearing infrastructure.
- Don't use one default for the whole redirect file. Slash and protocol rules are 301. The messy marketing list is item by item.
- Prefer 307/308 when the method matters. 301 and 302 have a history of turning POSTs into GETs in some clients. If you are redirecting a form or an API, 308 (permanent) and 307 (temporary) are the cleaner pair.
Temporary or permanent, a redirect is still a promise that the next hop works. linkbruno.com checks your URLs and redirects on a schedule, so a 302 you forgot about, or a 301 that now lands on a 404, shows up in a report instead of in a search-console graph three weeks later.
The parts I'm still unsure about
- How long a 302 should be allowed to live. Thirty days? Ninety? I want a default, and I have never found one that fits both a product launch and a legal takedown page.
- CDNs that rewrite 302 to 301, or cache them the same way, which makes the choice you made in origin less real than it looks in
curl -I. - Internal vs public URLs. I am stricter with 301 on public, indexed paths. I am more willing to 302 inside an app the crawler should not see.
A quick experiment
Export every redirect you currently send. Label each one 301 or 302 (or 307/308). For the 302s, ask "could I delete the old path tomorrow and be glad?" If yes, it is probably a 301. For the 301s, ask "would I panic if this were cached for a year?" If yes, it should not have been a 301, or the destination should be more stable.
Related reading
- How to find redirect chains and redirect loops with a short Python script (and why a 200 at the end can still be a problem)
- Your redirects file should be append-only. Deleting a redirect is a breaking change.
- When you delete a page on purpose, should it return 404 or 410? Let's argue about it
- Case study (hypothetical): after the domain change, every paying customer landed on a 404
When you are not sure, which status do you actually ship, and have you had to undo one that was cached more aggressively than you expected?