How to create a URL redirect in cPanel?

How to create a URL redirect in cPanel?

The redirect tool in cPanel allows you to edit a domain name so that it automatically redirects to a different domain name. This can also be described as redirecting from the source URL to the target URL.

This method only updates the source domains .htacess file so will only remain in place as long as the domain name being redirected is pointed to and is visible on the cPanel server.

To create a URL redirect in cPanel, follow these steps:

  • Step 1: Log in to your cPanel account
  • Step 2: Scroll down to the “Domains” section and select the “Redirects” option
  • Step 3: From the “Type” dropdown menu, select the type of redirect you would like to assign to this domain.

Permanent 301: This is a redirect that will update the visitor’s bookmarks and direct both visitors and search engines to the new target URL.

Temporary 302: This is a redirect that will redirect the visitor or search engine but will not update the bookmark meaning search engines will continue to index the source URL.

  • Step 4: Under the https?://(www.)? dropdown menu, choose the domain name you would like to redirect to the new target URL.

If you are only looking to redirect a certain folder or file you can enter this after the / under this dropdown box after selecting the domain name to be redirected.

  • Step 5: In the “Redirects” field you need to enter the full domain name of the new target URL where you would like to redirect to.
  • Step 6: Now you can choose what action the redirect takes using the “www.redirection” options. Here there are 3 options that are quite easy to understand:

Only redirect with www. This option will only redirect visitors and users who type www. as part of the URL.

Redirect with or without www. This option will redirect all visitors and users regardless of if they use www. or not.

Do Not Redirect www. This option will not redirect visitors that use www. as part of the URL.

Redirect with or without www. is the default option and is the option that most users select when creating URL redirects.

  • Step 7: The Wild Cart Redirect option allows you to set up a redirect to the same file on the target URL. This is useful if your source and target URL’s have the same structure only with a different domain name.
  • With Wild Card Redirect, www.sourceurl.com/contact.html will redirect to www.targeturl.com/conatct.html
  • Without Wild Card Redirect, www.sourceurl.com/contact.html will redirect to www.targeturl.com
  • Step 8: Finally, when you have chosen the required settings click “Add” to create the redirect.

Once you have completed these steps, when a user types www.sourceurl.com into their browser they will be redirected to www.targeturl.com.

May 6, 2021
Was this article helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *