301, 302, 307 and 308
301 and 308 mean moved permanently. 302 and 307 mean moved temporarily. Google treats the permanent ones as a strong signal to index the new URL. Temporary redirects keep the old URL in the index for a while, because you said the move is not final.
308 is the modern twin of 301 that keeps the request method, so a POST stays a POST. For ordinary pages, either works.
When to use one
Changing a slug, merging two pages, moving from http to https, choosing www or non www, or retiring a page whose closest replacement is another page. Redirect each old URL to the most relevant new page, not to the homepage, which Google may treat as a soft 404.
Mistakes to avoid
Chains, where A redirects to B and B to C. Loops. Redirecting to a page that is noindexed or 404s. Linking internally to redirected URLs instead of updating the links. Listing redirected URLs in the sitemap.
Testing redirects
Check each redirect with a tool that shows every hop and status code, not just the final page. Confirm that the old URL answers 301 or 308, that it lands on a 200 page in one step, and that the final page's canonical points at itself. Then update internal links, the sitemap and any ads to the new URL, so the redirect becomes a safety net instead of a daily path.
Example
A launch renamed from /launch/indieai to /launch/indie-ai answers the old URL with a 301 to the new one, so old links and rankings carry over.
Questions people ask
- How long should I keep a redirect?
- Google suggests at least a year. Keeping it forever is safest when old links still point to the old URL.
Related terms
- Canonical URLA canonical URL is the one address you want search engines to index for a page that can be reached at several. You declare it with <link rel="canonical" href="..."> in the page's head.
- Link equityLink equity is the ranking value a link passes from one page to another. It depends on the linking page's own strength, its relevance and how the link is marked.
- Crawl budgetCrawl budget is the number of URLs a search engine is willing and able to fetch from your site in a given time. It matters most for large sites and sites with many low value URLs.