{ }HttpStatus.com

301 Moved Permanently

The resource has permanently moved to a new URL, and clients should use the new URL going forward.

Defined in RFC 9110 §15.4.2

What 301 means

A 301 response means the target resource has been assigned a new permanent URL, and any future references to this resource ought to use one of the enclosed URIs, normally carried in the Location header. Search engines and well-behaved clients are expected to update their stored links to the new address rather than continuing to request the old one, which makes 301 the correct choice whenever a URL change is intended to be final rather than temporary.

RFC 9110 explicitly permits, but does not require, an automatic redirect for GET and HEAD requests. Historically this created a well-known ambiguity for POST, PUT, and DELETE: older clients (and some browsers) would silently rewrite the method to GET when following a 301, dropping the request body in the process. Because this behavior is so entrenched in deployed software, 301 should be treated as GET-only in practice; use 307 or 308 when the method and body must be preserved on redirect.

Browsers and CDNs are also permitted to cache a 301 aggressively, often indefinitely, since the redirect is declared permanent. This is a double-edged sword: it makes subsequent navigations fast, but it also means a mistaken 301 can stick in a user’s browser cache long after the server-side redirect is fixed, forcing users to clear their cache or use a private window to see the correction take effect.

For SEO, 301 is the canonical signal to search engines that link equity, rankings, and indexing should transfer to the new URL. This is the single biggest reason to choose 301 over 302 when migrating a domain, restructuring a URL scheme, or consolidating duplicate content: a 302 tells crawlers the move is temporary and they should keep the old URL indexed, while a 301 tells them to replace it.

Common causes

  • A page, endpoint, or entire domain was permanently moved to a new URL structure.
  • HTTP is being redirected to HTTPS, or a non-www host is being redirected to the canonical www (or vice versa).
  • Duplicate or legacy URLs are being consolidated onto one canonical URL for SEO purposes.
  • A CMS or e-commerce platform automatically issues a 301 when a page slug changes.
  • An API version or resource path was renamed and the old path permanently forwards to the new one.

How to fix a 301

If you are the client (browser user or API caller)

  • Update any bookmarks, hardcoded links, or stored URLs to point directly at the new Location instead of relying on the redirect.
  • For non-idempotent requests (POST, PUT, DELETE), do not assume the method and body survive the redirect; confirm the server behavior or switch to following 308 if the API supports it.
  • Clear the browser or HTTP client cache if an old, incorrect 301 seems to be sticking after the server-side redirect was corrected.
  • When building an HTTP client or SDK, follow the Location header exactly as given (it may be relative or absolute) and cap the number of hops followed to avoid infinite redirect loops.

If you run the server

  • Return a single 301 straight to the final destination; avoid chains of multiple 301s, which slow down crawlers and clients and dilute SEO signal.
  • Set the Location header to an absolute, canonical URL, including the correct scheme (https) and host.
  • Use 301 only when the move is truly permanent; use 302 or 307 for temporary redirects so caches and search engines do not lock in the wrong URL.
  • Set an appropriate Cache-Control header if you want to control how long browsers and CDNs cache the redirect, since some clients cache 301s indefinitely by default.
  • Update internal links, sitemaps, and canonical tags to the new URL so the site does not keep generating redirect traffic to itself.

Example

GET /old-blog/post-1 HTTP/1.1
Host: example.com

HTTP/1.1 301 Moved Permanently
Location: https://example.com/blog/post-1
Cache-Control: max-age=31536000

<html>
  <body>Moved to <a href="https://example.com/blog/post-1">here</a>.</body>
</html>
A legacy blog URL permanently redirected to its new path.

Try it live

Our free status responder returns a real HTTP 301 you can point tests, monitors or a browser at.

GET https://mcp.httpstatus.com/status/301

Related status codes

Tools for debugging this