Redirects and HTTP Status Codes
Every URL answers a request with a status code, and that number tells Google what to do with the page: index it, follow it elsewhere, drop it, or back off. Redirects are the most consequential of these, because they decide which URL inherits the strength of the old one. Pick the wrong code and you leak signals you spent years building.
What a redirect does
A redirect sends a client from one URL to another using a 3xx status code plus a Location header naming the destination. The browser or bot follows that header to the new URL. Redirects come in flavors: server-side (the server answers with the 3xx before any page loads), JavaScript (a script changes the location after the page runs), and meta refresh (a <meta> tag in the HTML). Server-side redirects are the most reliable, because they happen before rendering and every client honors them the same way.
The reason redirects matter so much for SEO is consolidation. A permanent redirect tells Google the old URL became the new one, and the new URL becomes canonical, inheriting the accumulated signals. A redirect is the strongest canonical statement you can make. Canonicalization →
Which redirect code
The split that matters is permanent versus temporary, because it decides which URL Google treats as canonical:
301Moved Permanently. The move is permanent; the target becomes canonical. The default for migrations, HTTP to HTTPS, and non-www to www.308Permanent Redirect. Same SEO meaning as301, and it preserves the request method and body. Fine for permanent moves.302Found (temporary). The move is temporary; the source stays canonical. Use only when the original URL really is coming back.307Temporary Redirect. Temporary, like302, with the method preserved.
Use the correct code up front. Google will eventually treat a long-lived 302 as if it were permanent, but relying on that wastes time and muddies the signal in the meantime. If a move is permanent, say so with a 301 or 308 from day one.
A 303 See Other exists too, forcing the client to fetch the destination with GET, but it is a temporary code and rare in SEO work. The practical vocabulary is small: permanent means 301 or 308, temporary means 302 or 307. The difference between the two members of each pair is whether the request method and body are preserved, which matters for forms and APIs more than for the plain page moves most SEO deals with. When in doubt for a permanent page move, reach for 301.
The redirect code is a canonical instruction. Permanent codes hand the target the source's standing; temporary codes keep it with the source. Choosing the right one up front is the whole game.
Status codes and search
Beyond redirects, the status code tells Google whether a page is eligible for the index and how to treat trouble. The families:
- 2xx. Success. The page is eligible for indexing.
- 4xx. The page is gone or unavailable and will not be processed. An already-indexed URL drops out over time.
410Gone signals permanence and can drop slightly faster than404Not Found, but both end in the same place. - 5xx. The server cannot serve the page. Persistent 5xx errors cut crawling, because Google backs off an unhealthy server. For planned downtime, return
503Service Unavailable with aRetry-Afterheader so Google knows to come back rather than treating the outage as permanent. - Soft 404. A page that returns
200but reads as empty or an error. Google will not index it. Return a real404or410, or add genuine content.
A slow server is a status-code problem in disguise, because rising response times push Google to crawl less. Speed sits under all of this. Server speed and TTFB →
Keeping redirects clean
The most common redirect damage is self-inflicted. A redirect chain, where A points to B and B points to C, forces every client and bot to make extra round trips, dilutes the signal, and adds latency for real users. A redirect loop, where the trail eventually points back to itself, breaks the page entirely. Collapse every chain to a single hop: point A straight at C.
JavaScript and meta-refresh redirects work but arrive later and count for less than a server-side 3xx, so prefer the server response when you can. And do not stop at the redirect. Update your internal links and your sitemaps to point at the final URLs directly, so you are not routing your own site through redirects you could have avoided. Chains are also a real latency cost on top of the SEO cost. Redirect chains and latency →
These same rules scale up into the hardest redirect job there is: moving a whole site. That is the migration chapter. Site and domain migrations next →