301 Redirect
Definition
The response carries the status line 301 Moved Permanently and a Location header holding the destination, absolute or relative. It has no meaningful body, because no client is expected to display it. Its sibling, 302 Found, uses the same mechanism to say the move is temporary — keep using the old address, this detour is for now. The practical difference is what each one does to accumulated value: a search engine consolidates the old URL's signals onto the new one after a 301, and deliberately keeps them on the old one after a 302. Two further codes exist for the cases where the HTTP method must survive the hop — 308 for permanent and 307 for temporary — which matters for POST requests and rarely for a static file. Browsers cache a 301 far more readily than a 302, sometimes indefinitely.
Why It Matters
Choosing the wrong one of the two costs real traffic. Move a page that ranks well and serve a 302: months later the old address still holds the ranking, the new one has built almost none of its own, and the moment you retire the old address the traffic goes with it. Serve a 301 and the transfer happens over a few crawls, typically some weeks, after which the new address stands on its own. The mirror-image mistake is worse in a different way — a 301 you did not mean is close to irreversible for individual visitors, because their browser has cached it and will not re-check the old address until the cache is cleared, no matter what the server now says.
How It Works
A browser requests the old URL, receives 301 with Location set to the new one, and immediately issues a fresh request there — two round trips where there was one, which is why redirect chains are worth avoiding. Search crawlers follow the same hop, then update their index to point at the destination and fold the old page's signals into it. Redirect one old address to one new address wherever you can, rather than sweeping a whole retired section to the home page, which crawlers often treat as a soft 404 and ignore. Keep chains to a single hop: a request that goes http to https, then apex to www, then old path to new path is three sequences of DNS, TCP and TLS before any content moves. Where the duplicate is genuinely meant to stay reachable, a canonical URL is the softer tool — a redirect removes the old address, a canonical merely names the preferred one.
Real-World Example
A studio renames a project and moves its case study on 99helpers from harbour-rebrand.99helpers.site to harbour-identity.99helpers.site. Setting a 301 on the old address means the fifty or so blog posts and newsletters linking to it still land on the live page, and within about six weeks the new address is the one appearing in search results. Had they used a 302, the old name would have kept the rankings and the new one would have stayed invisible.
Common Mistakes
- ✕Reaching for 302 because it sounds safer — it tells search engines to keep everything on the old address, which is rarely what a move means
- ✕Redirecting every retired page to the home page, which crawlers commonly treat as a soft 404 and pass no value through
- ✕Stacking redirects until a single request makes three hops, each adding a full connection sequence before anything renders
- ✕Testing a new 301 in a browser that already cached the old response, then concluding the change did not take effect
Related Terms
HTTP Status Code
An HTTP status code is the three-digit number a server returns at the head of every response, saying what happened to the request. It is the first thing on the first line — a 200 means here is the file, a 404 means there is nothing at that address.
Canonical URL
A canonical URL is the one address you nominate as the real home of a piece of content when several addresses serve it. You declare it with a rel=canonical link in the page head, and search engines use it to decide which version to index.
HTTPS Redirect
A rule that answers any request arriving on plain HTTP with an instruction to fetch the same address over an encrypted connection instead. It makes the secure version the only one visitors actually see.
Custom Domain
A custom domain is a name you own, pointed at content somebody else hosts, so visitors see files.acme.com instead of the provider's address. You keep the registration; the provider keeps the servers.
URL Slug
The readable, hand-picked part of a web address that names one particular thing — the 'acme-pitch' in acme-pitch.99helpers.site. It is chosen, short and made only of lowercase letters, digits and hyphens.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →