Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 301 Moved Permanently
3xx Redirection

HTTP 301 Moved Permanently

HTTP 301 Moved Permanently means the resource now lives at a new URL given in the Location header, and the move is permanent. Browsers cache it and search…

Quick answer

HTTP 301 Moved Permanently means the resource now lives at a new URL given in the Location header, and the move is permanent. Browsers cache it and search engines transfer ranking signals to the new URL, which makes 301 the standard redirect for site migrations and URL changes.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 301 Moved Permanently mean?

Clients should use the new URL from now on. Historically, browsers change a POST into a GET when following a 301, so for APIs that must keep the method and body, use 308. Because browsers cache 301s aggressively, test redirects carefully before deploying.

Status code301
NameMoved Permanently
Class3xx Redirection
Defined inRFC 9110 §15.4.2
Cacheable by defaultYes (heuristically cacheable)
Safe to retry automatically?Not applicable
Related headersLocation

What causes HTTP 301?

  • A URL was renamed or a site moved to a new domain or path structure.
  • HTTP→HTTPS or non-www→www normalisation.

How do I fix HTTP 301?

  1. Redirect each old URL to its closest equivalent, not everything to the homepage (Google may treat that as a soft 404).
  2. Avoid chains: point A directly to C rather than A→B→C.
  3. Update internal links and the sitemap to the final URL so crawlers do not depend on the redirect.

What should a client do after HTTP 301?

Follow the Location header and update saved links or bookmarks.

Does HTTP 301 affect SEO?

The preferred redirect for permanent moves. Google treats 301 and 308 as strong signals that the target should become canonical and passes ranking signals to it. Keep redirects in place for at least a year.

Example 301 response

HTTP/1.1 301 Moved Permanently
Date: Mon, 01 Dec 2026 12:00:00 GMT
Location: https://www.example.com/new-page/

How to return 301 Moved Permanently in code

Express (Node.js)

res.redirect(301, '/new-url');

Next.js route handler

return Response.redirect(new URL('/new-url', request.url), 301);

Flask (Python)

return redirect('/new-url', code=301)

PHP

header('Location: /new-url', true, 301);
exit;

Nginx

location = /old-url {
    return 301 /new-url;
}

Other 3xx status codes

Further action is needed, usually following the Location header to another URL.

Frequently asked questions

301 vs 308?
Both are permanent. A 308 guarantees the method and body are kept (POST stays POST); a 301 lets clients switch POST to GET. For normal page redirects either works for SEO.
How do I clear a cached 301 in Chrome?
Open DevTools, check “Disable cache” on the Network tab and reload, or clear browsing data for that site. Cached 301s otherwise persist.
Is 301 a client or server error?
Neither. 301 is in the 3xx Redirection class. Further action is needed, usually following the Location header to another URL.