Website Redirects — 301 vs 302
Redirect visitors from one URL to another properly.
Redirect Types
| Code | Type | When to Use |
|---|---|---|
| 301 | Permanent | Page permanently moved (SEO transfers) |
| 302 | Temporary | Page temporarily moved (maintenance, A/B test) |
Method 1: cPanel Redirects
- Go to Redirects in cPanel
- Select redirect type (301 or 302)
- Enter the source URL and destination
- Click Add
Method 2: .htaccess
Redirect single page
apache
Redirect 301 /old-page https://yourdomain.com/new-pageRedirect entire domain
apache
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]Redirect with pattern
apache
RedirectMatch 301 ^/blog/(.*)$ https://yourdomain.com/articles/$1WordPress
- Use Redirection plugin for managing redirects with a UI
SEO Impact
- 301 redirects pass ~95% of link equity to the new URL
- 302 redirects do NOT pass SEO value
- Always use 301 for permanent changes
- Update internal links to point to new URLs directly
Common Redirect Chains to Avoid
Avoid: http → https → www (two redirects)
Instead redirect directly: http → https://www (single redirect)