Website Spec
← SEO
Required

Redirects (301/302/308)

HTTP redirects send a client from one URL to another. Use 301 or 308 for permanent moves, 302 or 307 for temporary ones, and never chain more than necessary.

What it is

A redirect is a 3xx HTTP response that tells the client to fetch a different URL, named in the Location header. RFC 9110 defines the semantics of each status code.

HTTP/1.1 301 Moved Permanently
Location: https://example.com/articles/csp

The four codes that matter in practice:

For SEO, treat 301 and 308 as equivalent ("permanent"), and 302 and 307 as equivalent ("temporary").

Why it matters

When you move a page, every link, bookmark, and search result pointing at the old URL becomes a problem. A permanent redirect tells crawlers to forget the old URL and consolidate ranking signals onto the new one. A temporary redirect tells them the old URL is the canonical one and will return.

Getting this wrong is one of the most common SEO mistakes. A 302 on a URL that has actually moved permanently can take months to be reinterpreted as a 301, during which the site loses traffic.

How to implement

Rules of thumb:

Keep chains short. Each hop is a fresh request, costs latency, and risks a crawler giving up. A → B → C should be flattened to A → C and B → C wherever you control both rules.

Bad:  /old-name  → 301 → /new-name  → 301 → /new-name/
Good: /old-name  → 301 → /new-name/
      /new-name  → 301 → /new-name/

Other practical points:

Common mistakes

Verification

Sources