Domain Redirects and URL Forwarding
Redirecting domains and URLs is useful when you change domain names, restructure your website, or want multiple domains pointing to the same site. This guide covers all redirect options in cPanel.
Types of Redirects
301 Redirect (Permanent)
Use when content has permanently moved. Search engines transfer SEO value to the new URL.
- Domain name changes
- Permanent URL restructuring
- Consolidating multiple domains
302 Redirect (Temporary)
Use when content is temporarily at a different location.
- A/B testing
- Temporary maintenance
- Seasonal pages
Method 1: cPanel Redirects
- Log into cPanel
- Go to Domains → Redirects
- Configure:
- Type: Permanent (301) or Temporary (302)
- Domain: Select the domain to redirect
- Path: Leave empty for entire domain, or specify path (e.g., /old-page)
- Redirects to: Enter the destination URL
- www redirection: Choose how to handle www
- Wild Card: Check to redirect all paths
- Click Add
Method 2: .htaccess Redirects
For more control, add redirects to your .htaccess file:
Redirect Entire Domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
Redirect Single Page
Redirect 301 /old-page.html https://yourdomain.com/new-page.html
Redirect Directory
RedirectMatch 301 ^/old-folder/(.*)$ https://yourdomain.com/new-folder/$1
Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Force www or non-www
# Force www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# Force non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Method 3: Domain Forwarding at Registrar
If you only own the domain (no hosting), set up forwarding at your registrar:
- Log into your domain registrar
- Find DNS or Forwarding settings
- Enter the destination URL
- Choose redirect type (301 or 302)
- Choose masking options if available
Common Redirect Scenarios
Point Multiple Domains to One Site
Add each domain as an addon or alias domain in cPanel, then set up redirects to your primary domain.
Change from HTTP to HTTPS
After installing SSL, redirect all HTTP traffic to HTTPS using .htaccess.
Redirect After Site Restructure
Create individual redirects for each changed URL to preserve SEO.
Testing Redirects
- Use browser incognito mode to avoid cache issues
- Check redirect headers with httpstatus.io
- Verify SEO impact in Google Search Console
Troubleshooting
- Redirect loop - Check for conflicting rules in .htaccess
- Not redirecting - Clear browser cache and verify .htaccess syntax
- Wrong destination - Check URL spelling and protocol (http vs https)
Need Help?
Contact support if you need assistance setting up redirects.