CategoryContent and search
404 pages and redirects: when a page changes address
When a page moves to a new address, the right move is a permanent redirect (301 or 308) from the old path straight to the new one. When the content is gone and nothing replaces it, the server answers 404 or 410 and shows a page that explains what happened and points somewhere useful (Google, redirects and Search). The two shortcuts that backfire are sending everything to the home page and showing an error message with a success code.
Why the old address still matters
An old link keeps bringing people in. It might sit in a bookmark, an old message or another site’s text. Back in 1998, Jakob Nielsen argued that every published address should live forever, because someone who follows a link wants something from that site (NN/g, Fighting Linkrot). In the same piece, he cites a survey from the time that found 6% of links on the web broken.
His argument is a business one. Every address that stops working greets a new visitor with an error message, right on their first visit.
It moved: permanent redirect
Google splits redirects into two groups (Google):
- Permanent (301 or 308). The search engine starts treating the target as the page’s main address. Use it when the change won’t be undone.
- Temporary (302 or 307). The search engine follows the redirect but doesn’t take it as a sign that the target became the main address. It fits, for example, when a service on the site is down for a while and you want to show a page explaining what’s going on.
In Google’s table of HTTP codes, a 301 is a strong signal that the target should be processed, and a 302 is a weak one. The same table treats 308 like 301 and 307 like 302. Even so, it asks for the code that fits the case, since programs other than Google read that response too.
On Vercel, where kahue.net is hosted, the gap between 301 and 308 is technical. Both get cached by the browser, but a 308 never changes the request method, while a 301 may switch it to GET (Vercel docs). For a regular page, either one works.
Straight to the target, and for a long time
Google’s crawler follows up to 10 redirect hops, but the advice is to point the old address straight at the final one. If that’s not possible, keep the chain to 3 hops at most, and always under 5. Each extra hop slows down the person browsing, and not every browser copes with a long chain (Google, site moves with URL changes).
Chains tend to form without anyone noticing. A page changes address in March and again in August, and the new rule points to the March address, which was already redirecting.
As for how long, the same Google page says to keep redirects for as long as you can, generally at least a year. With visitors in mind, it suggests keeping them for good. Your own internal links, though, should go straight to the new address.
Gone for good: 404 or 410
A 404 says the server found nothing at that address (MDN on the 404 code). A 410 says more: the content is no longer available, and that’s likely to be permanent. If you’re not sure which one applies, MDN on the 410 code says to use 404.
For Google Search, the choice changes nothing. Google’s code table treats every 4xx error the same way, except 429. The URL drops out of the index, and the crawler visits less and less. The difference between 404 and 410 matters to other programs that read the response.
The error that pretends to be a success
The worst case is a page that says “not found” in its text but answers 200, the success code. Google calls this a soft 404, an error in disguise. When the content looks like an error message or an empty page, Search Console, Google’s dashboard for site owners, flags the problem (Google).
A redirect can earn the same label. Sending lots of old addresses to an unrelated target, such as the new site’s home page, confuses visitors and may be read as a soft 404 (Google, site moves with URL changes). The exception is when several old pages really were merged into one. Then they can all point to it.
What to write on the error page
NN/g’s article on the 404 page is also from 1998, and its core still holds (Jakob Nielsen, NN/g). The server’s default message breaks the three rules every error message should follow: plain language that doesn’t blame the person, precision and a hint of what to do next. A custom page, he says, should have:
- a short, slightly apologetic line saying the address wasn’t found on the site;
- the most common typing mistakes on the site, taken from the server logs;
- when possible, suggestions of similar addresses, already as links;
- a search box for the site.
In the same article, Nielsen cites a report from an Italian consultant. On a site of hotel pages, spell checking the requested URLs cut 404 errors by at least 40% (NN/g). That’s a single case, told by the person who ran it, not a study.
How I did it on kahue.net
The site has a single 404 page, served by Vercel on any path that doesn’t exist. It comes out in English, the site’s default language, and keeps the language switcher in the menu. Someone landing on an old Portuguese or Spanish address can switch languages without getting stuck.
It doesn’t switch the language on its own, and that’s on purpose. The site’s language detector sends people to the same path in the other language. On an address that doesn’t exist, that would only produce a second 404. The page also carries noindex, so it stays out of search, and it answers with a real 404 code, checked on the live site.
The text says the address doesn’t exist and offers two ways out: the home page and the full list of work. Going by NN/g’s list, what’s missing is the suggestion of similar addresses. The search box is left out because the site has no search.
Redirects live in vercel.json, all of them permanent. When the bel app case changed address, from bell-app to bel-app, the old path started pointing straight to the new one in all three languages. Old addresses under /pt-pt/ go to /pt-br/ with the rest of the path kept. Vercel warns that a wildcard matching any path can send everything to a single target (Vercel). Here the wildcard takes each page to its match, not to the home page.
Where the sources disagree
For NN/g, not even old content should die. His example is the sign-up page for a conference that’s already over, which should redirect to a report on the event or to next year’s program (NN/g).
Google is more careful. Redirecting to something unrelated can turn into a soft 404 (Google). The two views meet on relevance. A redirect is worth it when the target answers what the person was looking for. When nothing does, an honest 404 beats a generic home page.
The common mistake: checking only what shows on screen
The error page can look great and still answer 200. In the browser, both cases look the same. The check takes a minute: open the Network tab in the browser’s developer tools, or run curl -I with the address, and look at the code. Do the same with an old address and confirm it reaches the target in a single hop.


