How to Redirect Domains and Subdomains
Domain redirection allows you to forward visitors from one domain or URL to another. This is useful when you change domain names, consolidate websites, or create short URLs for marketing campaigns.
Types of Redirects
301 Redirect (Permanent)
A 301 redirect tells search engines that the page has permanently moved. This preserves your SEO rankings and is recommended for permanent changes.
302 Redirect (Temporary)
A 302 redirect indicates a temporary move. Use this when you plan to restore the original URL in the future.
How to Create a Domain Redirect in cPanel
Step 1: Access Addon Domains or Redirects
In cPanel, look for Addon Domains or Redirects under the Domains section.
Step 2: Create New Redirect
Click on Add Redirect and enter the source domain you want to redirect from.
Step 3: Set Destination
Enter the destination URL where you want to redirect visitors.
Step 4: Choose Redirect Type
Select whether you want a permanent (301) or temporary (302) redirect.
Step 5: Apply Redirect
Click Add to create the redirect.
Using .htaccess for Redirects
Redirect Entire Domain
Add this code to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ https://newdomain.com/$1 [R=301,L]
Redirect Specific Pages
Redirect 301 /old-page.html https://newdomain.com/new-page.html
SEO Considerations
- Always use 301 redirects for permanent moves
- Update internal links to point to new URLs
- Submit the new domain to Google Search Console
- Monitor redirect chains and avoid them
- Test redirects to ensure they work correctly
If you need help setting up redirects, contact our support team.