Every time a URL changes, someone's bookmark, a link from another site, and a search result still point at the old one. A redirect sends them to the right place. Done well, visitors never notice and rankings move to the new URL. Done badly, traffic disappears.

Which status code to use

CodeMeaningUse it when
301Moved permanentlyA page has a new permanent address
308Permanent, keeps the methodSame as 301 for APIs and form posts
302Found (temporary)A short-term move, such as an A/B test or maintenance
307Temporary, keeps the methodTemporary moves for APIs and form posts
410GoneThe page was removed on purpose and has no replacement

For SEO, permanent redirects pass the old page's signals to the new one. Use temporary redirects only when the old URL will genuinely come back.

Redirect to the closest match

Send each old URL to the page that best replaces it, not to the home page. Mass-redirecting everything to the home page is treated like a missing page, and visitors land somewhere unhelpful.

Avoid chains and loops

  • Chain: A → B → C. Each hop adds delay and some signal loss. Point A straight at C.
  • Loop: A → B → A. The page never loads.

After any change, crawl the redirects and fix chains longer than one hop.

Redirects are a safety net for links you cannot change. Update internal links, navigation, canonical tags and the sitemap to the new URL directly (internal linking guide).

Planning a site migration

  1. List every old URL: from the sitemap, analytics and a crawl.
  2. Map each one to its new URL in a spreadsheet.
  3. Implement the redirects at the server or CDN, as one-hop 301s.
  4. Test every row before launch: status code, destination, no chains.
  5. Launch, submit the new sitemap and watch Search Console's Pages report.
  6. Keep the redirects for at least a year; many links never get updated.

HTTP to HTTPS and www

Pick one canonical host (for example https://example.com) and redirect every other variant to it in a single hop: http://, www., and trailing-slash differences.

Monitoring after the change

Broken redirects often appear weeks later, when someone changes a rule. Add an uptime check for the most important old URLs that asserts the expected status and destination, and watch 404s in your logs after any migration.

Is a 301 or 302 better for SEO?

Use 301 (or 308) for permanent moves; it passes the old page’s signals to the new one. Use 302 only for genuinely temporary moves.

How long should I keep redirects?

At least a year, and ideally indefinitely for important URLs, because external links are rarely updated.

Should I redirect deleted pages to the home page?

No. Redirect to the closest relevant page, or return 410 if there is no replacement.

Try VitalRix free

Uptime monitoring, APM, logs, real user monitoring and status pages in one place. No credit card needed.