01 Moving House
When you delete a page or change your domain, you don't want visitors to land on a "404 Not Found" error. You use a redirect to automatically send them to the new location. But technically, not all moves are the same.
02 The "Mail Forwarding" Analogy
Imagine you move to a new house and fill out a form at the post office based on how long you're staying:
301 Moved Permanently
"I've sold the old house. Send all my mail to the new address forever." (Update your address book)
302 Found (Temporary)
"I'm on vacation for a month. Send mail here for now, but I'll be back." (Don't update address book)
03 The Codes in Detail
Permanent
Use this for site migrations, HTTP to HTTPS, or www to non-www. It tells Google to transfer all SEO ranking to the new URL.
Temporary
Use this for A/B testing, maintenance pages, or geo-targeting. Google will keep the OLD page indexed.
Client-Side
Redirects done in HTML (delay of 5s). Avoid these! They are bad for SEO and user experience.
04 Redirect Chains & Loops
The shortest distance between two points is a straight line. Every extra "hop" slows down your site.
The Chain (Bad)
http://site.com ➔ https://site.com ➔ https://www.site.com. This forces the user to wait for 2 round-trips to the server.
Fix: Redirect the first link directly to the final destination.
The Loop (Broken)
/page-a redirects to /page-b, which redirects back to /page-a. The browser will give up after ~20 tries.
Fix: Identify the conflicting rule in your .htaccess or config file.
05 Why Clean Redirects Matter
06 Frequently Asked Questions
How many redirects are too many?
Google recommends keeping redirect chains to under 3 hops. Anything more than 5 is considered a 'Redirect Chain' issue and may cause the crawler to stop following.
What is a 'Redirect Loop'?
It's when Page A redirects to Page B, and Page B redirects back to Page A. The browser gets stuck in an infinite loop and eventually crashes with an 'ERR_TOO_MANY_REDIRECTS' error.
Does a 301 redirect pass SEO value?
Yes. A 301 (Permanent) redirect passes almost all of the 'Link Juice' (ranking power) from the old URL to the new one. A 302 (Temporary) redirect does not.
What is mixed content in a redirect?
This happens when an HTTPS site redirects to an HTTP (insecure) page, or vice-versa. It breaks the 'Secure Lock' icon in the browser.