Child pages
  • Redirects
Skip to end of metadata
Go to start of metadata

For cPanel & WHM 11.48

(Home >> Domains >> Redirects)

Overview

The Redirects interface allows you to send all of the users that access a domain or particular page to a different URL.

For example, if you have a long URL that you cannot shorten, use the Redirects interface to add a redirect from a short URL to the long URL. Users can access the content of the long URL via the short URL.

Add a redirect

To add a redirect, perform the following actions:

  1. Select a redirect type from the Type menu.
    • The Permanent (301) option notifies the visitor’s browser to update its records.
    • The Temporary (302) option does not update the visitor’s bookmarks.
  2. Select **All Public Domains ** or a domain name from the menu.
    • Use the * *All Public Domains* * option to redirect all of the domains that your cPanel accounts control.
  3. In the text box to the right of the domain selection menu, enter the rest of the URL that you want the server to redirect.
  4. In the redirects to text box, enter the URL to which you wish to redirect users.

    Important:

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

  5. Select one of the following options:
    • The Only redirect with www option only redirects users who enter www in front of the page name.
    • The Redirect with or without www. option redirects all users regardless of whether the www. prefix is included with the URL.
    • The Do Not Redirect www. option does not redirect users who enter www. with the URL.
  6. Select the Wildcard Redirect option 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 option and example1.com redirects to example.com, then a visitor who tries to access the http://example1.com/pic.jpg URL redirects to the http://example.com/pic.jpg URL.
  7. Click Add.
    • To test the redirect, click the link under Directory in the Current Redirects table. If the redirect is properly configured, the system directs you to the original domain.

      Important:

      If you use a third-party application or content management system to add a redirect, such as Wordpress®, the redirect may not function as intended. When you add a redirect with cPanel interface, the system places redirect rules at the bottom of the .htaccess file. Some third-party applications ignore this rule, because those applications only read rules and configurations that are inside tier config brackets.

      The following example displays the configuration that you must add to the top of the .htaccess file to add a redirect for the Drupal content management system.

      In the following example:

      • drupal.user.example.com is the URL to redirect.
      • http://cpanel.net is the URL to which to redirect.

       

      Note:

      You cannot edit a redirect. To modify a redirect, you must delete it, and then recreate it.

Remove a redirect

To remove a redirect, perform the following steps:

  1. Click the button that corresponds to the redirect that you want to remove.
  2. To confirm that you wish to remove the redirect, click Yes.
    • To keep the redirect, click No.

Search your redirects

To search your redirects, perform the following steps:

  1. Enter the search criteria into the Search text box.
  2. Click Go.

The redirects that match your search criteria will populate the list.

To sort your list of redirects, click the appropriate table heading (for example, Directory or Type).