3xx Redirection

HTTP 301 Moved Permanently

HTTP 301 Moved Permanently means the resource has a new permanent URL, given in the Location header.

What 301 Moved Permanently means

Browsers and search engines remember a 301: the old URL is replaced by the new one, and ranking signals move with it. Browsers may also change a POST into a GET when following a 301, which is why 308 exists.

Common causes

  • A page moved to a new slug or path.
  • Host normalisation, such as www to non-www or http to https.
  • Trailing-slash or case normalisation.

How to fix or use it

Use 301 (or 308) for permanent moves, redirect straight to the final URL in one hop, and update internal links and the sitemap to the new URL so crawlers stop hitting the redirect.

Express (Node.js) example

app.get('/old-post', (_req, res) => res.redirect(301, '/blog/new-post'));

SEO impact

The standard way to move a page without losing rankings. Avoid chains (A to B to C) and never redirect every missing page to the home page; Google treats that as a soft 404.

Other 3xx Redirection codes