cPanel Domain Redirect
A Domain redirect allows you to make one domain redirect to another domain, either for a website or a specific web page. For example, create a redirect so that www.example.com automatically redirects users to www.example.net.
How to Setup Domain Redirect in cPanel
- Login to your cPanel Control Panel.
- In cPanel dashboard locate Domains Tab then click Redirect icon.
- From Add Redirect Page fill the following
- Type: you have two option of redirect types
- Permanent 301 is a redirect that will update the visitor’s bookmarks and search engines will index the new site url.
- Temporary 302 is a redirect that will redirect the visitor or search engine but will not update the bookmark, and search engines will remain indexing the original page.
- https?://(www.)? : from the drop down list you have to select the domain you want to redirect , in-case you want to redirect only single page you can add the page name on the next text editor with / mark.
- Redirects to: type the full URL of the page to which your site will be redirecting.
- www. redirection:here you have an option to define the redirection behavior:
- Only redirect with www. : with this option only redirects visitors that type www. as part of the URL e.g www.yourdomain.com only will redirect to the new url.
- Redirect with or without www. :redirects all visitors from your webiste regardless of if they use www. or not.
- Do Not Redirect www. : with this option will not redirect visitors that use www. as part of the URL.
- Wild Card Redirect :This will add the the file/folder name after the url when it redirect. For example, mydomain.com/hello.html would redirect to mydomain1.com/hello.html.
- Type: you have two option of redirect types
- Click Add Button , now your visitors will redirect to the new URL depends on the options you select above.
Do NOT redirect from domain.com to www.domain.com or from domain.com to domain.com/index.something, this will cause an infinite loop. If you want to do so , you must use mod_rewrite by adding .htaccess code.
How to Remove Domain Redirect in cPanel
To do remove the already configured Domain Redirect in cPanel :
- Login to your cPanel Control Panel.
- In cPanel dashboard locate Domains Tab then click Redirect icon.
- From the Current Redirects List , Select the redirection you want to remove then under Actions, and click Delete , confirm the message and click Remove Redirect button.