What Is HTTP 301 Moved Permanently?
HTTP 301 Moved Permanently explained, and what it means when you see it in CI/CD and deployments.
HTTP 301 tells clients the resource has permanently moved to a new URL.
What it means
A 301 includes a Location header with the new URL. Browsers and well-behaved clients update bookmarks and follow it. Search engines transfer ranking to the new URL.
When you see it in CI/CD
In CI, a curl without -L will not follow the redirect and may "fail" unexpectedly. Add -L to follow, or assert the 301 and its Location explicitly.
Key takeaways
- 301 is a permanent redirect.
- Follow it with
curl -L. - Search engines pass ranking to the new URL.