Help Center / Domain Names

How to Setup a Domain Redirect

Updated: November 27, 2023


The cPanel Redirects interface allows you to send all of the visitors of a domain name or particular page to a specified URL. A redirection occurs when a web server redirects a visitor from one web page to another web page. For example, if you create a webpage with a long URL, use the Redirects interface to add a redirect from a short URL to the long URL. Visitors can enter the short URL to access the content of the long URL.


In this guide, we will show you how to setup a domain redirect.




Step 1

33% Complete (success)
Cpanel Login Screen

Log into your cPanel Account.






Step 2

66% Complete (success)
cPanel Addon Domain

Navigate to Domains section and click on the Redirects icon.






Step 3

100% Complete (success)
cPanel Addon Domain form

You will now be presented with a form to enter details.


To add a redirect, perform the following actions:

Select a redirect type from the Type drop-down menu.

Permanent (301) - This setting notifies the visitor's browser to update its records.
Temporary (302) - This setting does not update the visitor's bookmarks.

Select a domain name from the menu, or select **All Public Domains** to redirect all of the domains
that your cPanel account controls.

In the next field, enter the rest of the URL from which you wish for the server to redirect
visitors. For example, if you wish to redirect http://mydomain.com/ to another
URL, enter filename.html in this text box.

In the Redirects to text box, enter the URL to which you wish to redirect users.


Note: You must specify a protocol in this text box. For example, http://, https://, or ftp://.


Select one of the following settings:

Only redirect with www.: This setting only redirects visitors who enter the www. prefix before
the domain name part of the URL.

Redirect with or without www.: This setting redirects all users, regardless of whether the visitor
enters the www. prefix before the domain name part of the URL.

Do Not Redirect www.:This setting does not redirect users who enter the www. prefix before the the
domain name part of the URL.

Wild Card Redirect: Select this setting if you wish to redirect all files within a directory to the same
filename in the new directory. For example, if you enable the Wild Card Redirect setting and example-1.com
redirects to example-2.com, then a visitor who tries to access the http://example1.com/file.html URL
redirects to the http://example.com/file.html URL.

Click Add and it's now complete.





Thats it! You have now successfully redirected a domain name.