HTTP Redirect Status Codes
When a URL changes, the server returns an HTTP code telling the browser and search engines how to respond. The main codes are:
- 301 Moved Permanently: the resource has permanently moved to a new address.
- 302 Found: the resource is temporarily at a different address.
- 307 Temporary Redirect: similar to 302, but guarantees the HTTP method (GET, POST) is preserved.
- 308 Permanent Redirect: similar to 301, but also preserves the HTTP method.
In practice, most cases come down to a choice between 301 (permanent) and 302 (temporary).
SEO Impact: Page Rank Transfer
Page Rank (or link equity) refers to the authority passed by inbound links to a URL. It is a major ranking factor for Google.
A 301 redirect transfers approximately 100% of this equity to the new URL. Google quickly indexes the new address and removes the old one from its results.
A 302 redirect is theoretically temporary: Google keeps the old URL in its index and does not transfer Page Rank. In practice, if a 302 stays in place too long, Google eventually treats the signal as a 301 — but this process is slow and unpredictable. It is better to choose the correct code from the start.
Use Cases
Each redirect type has its appropriate scenarios:
Use a 301 for:
- Domain migration (old-domain.com → new-domain.com)
- HTTP to HTTPS transition
- Article slug or category changes
- Permanent site restructuring
Use a 302 for:
- Temporary maintenance (redirecting to a maintenance page)
- A/B testing (showing a page variant to certain visitors)
- Geolocation (temporarily redirecting to a regional version)
Redirect Chains and Redirect Loops
A redirect chain occurs when URL A redirects to B, which redirects to C, and so on. Each hop adds delay. Beyond 3 to 4 chained redirects, PageSpeed and search engines penalize load speed and may stop following the chain.
A redirect loop is a critical error: A redirects to B which redirects back to A. The browser displays the error ERR_TOO_MANY_REDIRECTS. This often occurs during HTTPS configuration when rules conflict.
Apache Configuration
On Apache, redirects are configured in the .htaccess file using two methods:
# Simple redirect
Redirect 301 /old-path https://example.com/new-path
# With RewriteRule (more flexible)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
The second form is the standard method for forcing HTTP to HTTPS across the entire site.
Audit Your Redirects
Misconfigured or chained redirects can cost you search ranking positions without you realizing it. Run a free audit to detect redirect chains, loops, and incorrect HTTP codes on your site.