301 Moved Permanently
The resource moved permanently to the Location URL. Search engines transfer ranking.
Common causes
- Domain change, HTTP to HTTPS, new URL structure
- Adding / removing www or a trailing slash
How to fix
- Use 301 for permanent moves so Google transfers ranking to the new URL
- Avoid redirect chains (A → B → C): point straight to the final URL
- Update internal links and the sitemap to the new URL
Detailed reference (MDN) ↗RFC 9110 §15.4.2 ↗
Which code should I use?
- 301 / 308: Both are permanent redirects. Browsers may turn a POST into GET with 301; 308 keeps the method and body. Normal pages: 301; APIs or POST forms: 308.
