HTTP 301

301 Moved Permanently

Redirect

The requested resource has been assigned a new permanent URI and any future references should use the URI in the Location header. Search engines transfer ranking signals from the old URL to the new one, and browsers cache the redirect aggressively. Once a browser has seen a 301 for a URL, it may bypass the network entirely on subsequent visits. The HTTP spec historically allowed clients to change the method from POST to GET when following a 301, which is why 308 exists for cases where method preservation matters.

When does this happen?

Use 301 when a URL has permanently changed and you want crawlers, browsers, and bookmarks to switch to the new address. Domain migrations, HTTPS upgrades, www-canonicalization, trailing-slash normalization, and path restructuring after a CMS migration are all canonical 301 use cases. The response must include a Location header pointing at the new URL. Browsers cache 301s by default. Chrome and Firefox both honor 301s as cacheable indefinitely unless the response includes a Cache-Control header that says otherwise. This caching is the single biggest reason to be careful with 301: shipping the wrong destination and then fixing it does not undo the redirect in users' browsers. For SEO, Gary Illyes stated on Twitter in 2016 that 30x redirects no longer lose PageRank; Google Search Central docs describe 3xx redirects as consolidating ranking signals on the destination URL, but the absence of any decay has not been formally restated in Search Central documentation. Watch for chains of 301s. Each hop adds latency and crawlers eventually give up after roughly five hops. Older clients may rewrite POST as GET when following a 301, which is why API clients should prefer 308.

Common causes

How to fix it

Real-world examples

Site migrates from HTTP to HTTPS and the load balancer rewrites every http://example.com URL to https://example.com.
Browser receives 301 with Location: https://example.com/path and immediately requests the HTTPS URL. Subsequent visits skip the HTTP request entirely because the redirect is cached.
Old blog at example.com/blog/2019/why-redirects moves to example.com/articles/why-redirects after a CMS migration.
Server returns 301 with Location: /articles/why-redirects. Crawlers update the index over the following weeks and link equity flows to the new URL.
User visits the bare apex domain example.com and the site canonicalizes to www.example.com.
Server returns 301 with Location: https://www.example.com/. Browser follows and caches the redirect so future visits go straight to www.
Trailing-slash normalization: /about redirects to /about/.
Server returns 301 with Location: /about/. The original URL is removed from search results within a crawl cycle and bookmarks update silently.
Legacy product URLs like /p?id=123 are redirected to /products/blue-widget.
Server returns 301 with the clean URL in Location. Search engines drop the parameterized URL from the index in favor of the canonical.
API client issues POST /v1/old-endpoint with a JSON body to a deprecated endpoint.
Server returns 301 with Location: /v2/new-endpoint. Older HTTP clients may follow the redirect with GET, dropping the body. This is why APIs should prefer 308 for permanent moves.

Debugging

How it differs from related codes

HTTP 302

302 signals a temporary move. Browsers and search engines keep the original URL canonical. 301 transfers ranking signals and tells everyone the new URL is permanent.

HTTP 307

307 is a temporary redirect that strictly preserves the HTTP method and body. 301 is permanent and historically allowed clients to rewrite POST to GET, which can corrupt API behavior.

HTTP 308

308 is the strict-method version of 301. Same permanence semantics but the client is required to keep the original method and body. Use 308 for permanent API moves; use 301 for HTML page moves.

Related status codes

302 303 307 308 404 410

See HTTP 301 in your redirect chains?

Check your URLs with checkredirects.io