A redirect sends visitors and search engines from one address to another.
301 (permanent)
Use when a page has moved for good: a new URL, a merged page, HTTP to HTTPS, non-www to www. Search engines transfer the old page's signals to the new one.
302 / 307 (temporary)
Use only when the move really is temporary, such as a short maintenance page.
Examples
- Old product page
/ro-purifier-old→ new page/purifiers/ro-7-stage: 301. http://pepploweb.com→https://pepploweb.com: 301.- A product temporarily unavailable, sending visitors to the category for two days: 302.
Server-side vs JavaScript redirects
Redirect on the server (status codes) wherever you can. JavaScript redirects may be followed by search engines, but more slowly and less reliably.
Keeping track
Keep a list of redirects with the date and reason. When you redesign or migrate later, you will need it to avoid chains.
How long to keep redirects
Keep 301 redirects for as long as possible. Old links on other sites, bookmarks and printed materials may point to the old address for years.
Avoid
- Redirect chains: A → B → C. Point A straight to C.
- Redirect loops.
- Redirecting everything to the home page when a page is removed. Redirect to the closest relevant page or return 404 / 410.
- Meta refresh redirects.
Check any address with the redirect checker, and generate server rules with the .htaccess redirect generator.
0 comments