How to Redirect a Domain in cPanel
A redirect automatically sends visitors and search engines from one URL to another. This is useful when you move a page, rename a domain, or restructure your website. cPanel provides a simple tool to manage redirects without editing code.
Types of Redirects
- 301 Permanent Redirect: The page has permanently moved. Search engines transfer SEO ranking to the new URL. Use this for domain changes or permanently moved pages.
- 302 Temporary Redirect: The page has temporarily moved. Search engines keep the original URL indexed. Use this for temporary maintenance or A/B testing.
Steps to Create a Redirect
- Login to cPanel.
- Under the Domains section, click Redirects.
- Configure the redirect:
- Type: Choose 301 (Permanent) or 302 (Temporary).
- https?://(www.)? – Select your domain from the dropdown.
- Redirects to: Enter the destination URL (include https://).
- www. Redirection: Choose to redirect with or without www, or both.
- Wild Card Redirect: Check this to redirect all files in the source directory to the same filename in the destination.
- Click Add.
Redirect via .htaccess
For more control, add redirects directly in your .htaccess file:
# 301 redirect a single page
Redirect 301 /old-page.html https://yourdomain.com/new-page/
# 301 redirect entire old domain to new domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]
SEO Tip: Always use 301 redirects when permanently moving content. This passes link equity (SEO value) to the new URL and prevents ranking loss.
Removing a Redirect
To delete a redirect, go to cPanel → Redirects, scroll to the Current Redirects section, and click Delete next to the redirect you want to remove.
If you continue to face issues, please open a create a request.
