How to Create a URL Redirect in cPanel Print

  • cPanel, URL Redirect
  • 131

The Redirects tool in cPanel allows you to guide visitors from a source URL to a target URL. Keep in mind that redirects modify only the .htaccess file. Once added to cPanel, the domain name will appear in the list.

Warning: Avoid creating redirects from "yourdomain.com" to "www.yourdomain.com" or from "yourdomain.com" to "yourdomain.com/index.something." Doing so will result in an infinite loop. To manage the 'www' prefix and the index page, use mod_rewrite by inserting the appropriate code into your .htaccess file.

How to Set Up a Redirect in cPanel:

STEP 1: Log in to cPanel.

There are two methods to log into your cPanel.

  • Method 1: Log in to your cPanel directly.
  • Method 2: Log in to your cPanel through your Customer Portal.

Through your Customer Portal;                          

  • Log in to your Customer Portal.
  • Click on "Log in to cPanel".

Login-to-cPanel

STEP 2: Locate the Domains section and click on Redirects.

cPanel - Domains Section - Redirects

STEP 3: From the Type dropdown menu, choose the type of redirect you prefer.

  • Permanent 301 Redirect: This type will update the visitor's bookmarks and notify search engines to index the new site.
  • Temporary 302 Redirect: This type will redirect visitors or search engines without updating bookmarks, and search engines will continue to index the original page.

STEP 4: From the https?://(www.)? dropdown menu, select the domain you wish to redirect.

  • To redirect a specific page or directory, use the text field starting with a forward slash (/) to enter the file or folder name.

STEP 5: In the Redirects To field, provide the full URL of the page you want to redirect to.

Be sure to include the protocol (e.g., https://, http://, or ftp://) for the domain URL to be valid.

STEP 6: Choose one of the following www. redirection options:

  • Only redirect with www.: This will redirect visitors who include "www." in the URL.
  • Redirect with or without www.: This will redirect all visitors, whether they use "www." or not.
  • Do Not Redirect www.: This will exclude visitors using "www." from being redirected.

STEP 7: If you select the Wild Card Redirect option, it will redirect to the same file at a new destination. For example, www.example.com/about.html will redirect to www.example-destination.com/about.html.

  • Without the Wild Card Redirect, example.com/about.html would only redirect to www.example-destination.com, not to the specific page.

STEP 8: Finally, click Add to create the redirect. Once done, visitors typing the specified URL will be redirected to your target destination.

cPanel - Redirects Page - Add


Was this answer helpful?

« Back