Redirect a Domain in cPanel

cPanel is quite popular management tool with PHP Apache hosting servers. It is very powerful and easy to use. In this guide, we will discuss how to easily redirect a domain in cPanel. The instructions below apply to any shared web hosting services with cPanel. Within your cPanel, you can not only redirect domains, like 301 or 302 redirect from www.domain1.com to www.domain2.com, but also redirect specific pages, such as redirect from www.domain1.com/special.html to www.domain2.com/promote.html, or sometimes from a directory to another directory.

301 redirect domain

Redirect a domain in cPanel


First, log into your cPanel with your web host; Click on the “Redirects” button under the “Domains” section. Scroll down the page if you can’t find it.

Redirect a Domain in cPanel
Redirect a Domain in cPanel

Choose a permanent 301 redirect, because it has the best SEO benefits. A permanent redirection can pass not only the traffic from old domain to a new domain but also the SEO juice. 301 permanent redirects is the default option.

In the drop down list choose the domain you want to forward; in the redirects to box, type in the target domain name which you want the traffic redirected to.  Once you are done, click on “Add” to finalize the domain redirection in cPanel.

After that, do not forget to do a 301 redirect checking with a free online 301 redirect checker. This is not necessary, but can help you avoid mistakes such as a domain name typo or else.

The steps above apply to any web hosting services with cPanel as the hosting control panel, such as Bluehost, Justhost, HostGator, InMotion hosting, etc.

cPanel Domain Redirects Additional Tips

  1. About WWW. Redirection

You can choose to redirect with WWW only, without WWW, or the third option with or without WWW in front of the domain.

  1. Redirect a folder or page within the same domain

In the “redirects to –>” box, enter http://www.yourdomain.com/new-file-or-folder-name

  1. Redirect from domain.com to www.domain.com

Make sure to tick “Do Not Redirect www.”, then in the “redirects to –>” box, enter http://www.domain.com.

  1. Redirect from the www version to non www version using cPanel?

Instead of configuring this in cPanel, you can use .htaccess 301 redirection. To Redirect to non-WWW with the .htaccesss file, you can use below code.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^yourwebsite.com$
RewriteRule (.*) http://yourwebsite.com/$1 [R=301,L]

For more details, you can refer to this guide: WordPress 301 redirection (it is not merely for WordPress, but other websites or CMS on PHP Apache servers, such as Dropal, Joomla and so on).

  1. Wild Card Redirect

Wild Card Redirect will redirect all files within a directory to the same filename in the redirected directory. This is for entire website redirection or whole folder redirection. For example, when wild card redirects are active and your domain1.com redirected to domain2.com, then a visitor trying to access domain1.com/imagexxx.jpg will be redirected to domain2.com/imagexxx.jpg.

You cannot use a Wild Card Redirect to redirect your main domain to a different directory within the same website.

Leave a Reply