HTTP 301 Moved Permanently indicates the requested resource has been assigned a new permanent URI. All future requests should use the new URL provided in the Location header. Search engines transfer link equity to the new URL, making this the correct redirect for permanent URL changes.
301 Moved PermanentlyGET /blog/old-post HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/htmlHTTP/1.1 301 Moved Permanently
Location: /blog/new-post
Content-Type: text/html; charset=utf-8
Content-Length: 162
<!doctype html>
<html>
<body>
<h1>Moved Permanently</h1>
<p>This page has moved to <a href="/blog/new-post">/blog/new-post</a>.</p>
</body>
</html>Check the Location header in the response to find the new URL.
curl -I https://example.com/old-page
Replace references to the old URL with the new one to avoid unnecessary redirect hops.
Multiple consecutive redirects slow down page loads. Ensure there is only one hop to the final destination.
curl -L -v https://example.com/old-page 2>&1 | grep 'Location:'
Ensure both old and new domains resolve correctly.
Check DNS RecordsThe website restructured its URLs and set up 301 redirects from old paths to new ones to preserve SEO and bookmarks.
The server redirects all HTTP requests to HTTPS permanently.
The site moved to a new domain and all traffic is redirected from the old domain.
| Specification | Section |
|---|---|
| HTTP Semantics | RFC 9110 §15.4.2 |
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.