« Back

Managing Redirects in cPanel

BasicscPanel Webhosting

What Does the Redirects Tool Do?

The Redirects tool allows you to direct visitors from one domain or page to a new URL, which can be particularly helpful for shortening URLs or rerouting traffic to an updated site.

 Keep in mind that redirects cannot be modified directly; instead, you’ll need to delete an existing redirect and create a new one if changes are needed. To set up a secure redirect from an HTTP site to an HTTPS version, use Force HTTPS Redirect in the Domains section (cPanel > Home > Domains > Domains).

How Do I Add a Redirect?

To add a new redirect:

  1. Choose a Type: 

Permanent (301): Instructs the browser to remember the redirect.

Temporary (302): Redirects without updating bookmarks.

  1. Choose a domain, or select **All Public Domains** to apply to all domains managed in your cPanel account. Alternatively, select the specific domain you want to redirect from the drop-down menu.
  2. Enter the URL path in the text box where the server will redirect visitors from. For instance, to redirect http://example.com/directory/file.html to another URL, enter directory/file.html.
  3. In Redirects to, specify the target URL, making sure to include the protocol (e.g., http://, https://).
  4. Set the www options to define how the redirect should apply:

Only redirect with www.

Redirect with or without www.

Do Not Redirect www.

(The “www” options won’t be available if you’ve selected **All Public Domains**!)

  1. If you’d like all files within a directory to redirect to matching filenames in the target directory, enable the Wild Card Redirect option. For example, with Wild Card Redirect enabled, if example1.com redirects to example.com, a visitor trying to access http://example1.com/pic.jpg will be forwarded to http://example.com/pic.jpg.
  1. Add the Redirect: Click Add to save the redirect.
  2. To confirm your redirect works as expected, select the link under Directory in the Current Redirects table.

Tip: If you want to create a redirect that keeps the original domain visible in the browser’s address bar, consider creating a subdomain and setting the redirect there (cPanel > Home > Domains > Domains).

What’s in the Current Redirects Table?

The Current Redirects table displays all redirects set up in your account. Use the Search box to locate specific redirects.

The table includes the following information about each redirect:

Domain: The redirected domain; “ALL” indicates all public domains in the account.

Directory: The directory to which the redirect applies; click to test it.

Regular Expression: A pattern that matches any URLs that should be redirected according to this expression.

Redirect URL: The target URL where users are directed.

HTTP Status Code: The redirect type, with 301 indicating a permanent redirect and 302 a temporary redirect.

Type: Shows if the redirect is permanent or temporary.

Match www: Specifies if the redirect applies to users with or without “www,” or both.

Wildcard: Indicates if the Wild Card Redirect feature is enabled, allowing all files within a directory to redirect to the same file names in the new directory.

Actions: Click Delete to remove the redirect, and confirm by selecting Yes.

Important: Most web browsers store redirects in their cache. If visitors don’t immediately see the changes, they may need to clear their browser cache to refresh the redirect information.

Looking for cPanel web hosting?

Rackhost has the perfect plan for you.

Learn more

Related posts