301 Moved Permanently: The resource has permanently moved to a new URL. 301 Moved Permanently tells browsers and search engines that a URL has moved for good, and where it went. The Location header holds the new address. For SEO this is the code you want when you change URLs, switch to HTTPS or move to a new domain. Search engines transfer the old page's ranking to the new URL and update their index. Without a redirect, the old URL returns a 404 and the ranking it built up is lost.
Frequently asked questions about 301 Moved Permanently
What should you keep in mind with 301 Moved Permanently?
Browsers cache 301s aggressively, sometimes for a very long time. A wrong permanent redirect is hard to undo for visitors who already followed it. Test redirects carefully, and use 302 while you are still experimenting. When you relaunch a website, make a list of old URLs and map each one to its new place.
Use when an HTTP request returns an unexpected status code (4xx or 5xx, or a redirect loop), when a user pastes an error like "419 Page Expired", "422 Unprocessable Content", "502 Bad Gateway" or "CORS error", or when debugging API calls between a frontend and a Laravel/PHP or Node backend. Finds the cause from the status code, headers and logs before changing code.
'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.