Skip to Content
DomainsDomain tools in cPanel

Redirects

The Redirects interface lets you send all visitors to a domain or a specific page to a different URL. This is useful, for example, for smoothly sending visitors to another web address, such as offering a short link to a page with a long URL, or to avoid storing sensitive data (for instance, when a payment processor like Stripe provides a link to its own secure page instead of you storing card details).

Note

You can't edit an existing redirect; to change it, you must delete it and then create it again. To redirect a domain's visitors from HTTP to HTTPS, use the Force HTTPS Redirect option in the Domains interface instead of this one.

Add a redirect

Choose the redirect type: Permanent (301) indicates that the site has moved permanently to a new location and tells search engines to update their records, while Temporary (302) indicates a temporary move (useful during maintenance, for example) and doesn't affect search engine records.

Choose a domain from the list, or choose All Public Domains to redirect all of your account's domains.

In the field after the slash (/), enter the rest of the URL you want to redirect. For example, to redirect http://example.com/directory/file.html, enter directory/file.html.

In the Redirects to field, enter the full target URL including the protocol (http://, https://, or ftp://); for example, http://example.com.

Choose one of the www. options: Only redirect with www (external link)., Redirect with or without www (external link)., or Do Not Redirect www (external link)..

Note

This option is disabled when you choose All Public Domains.

Turn on Wild Card Redirect if you want to redirect all files in a directory to the same file name in the new directory. For example, if this option is on and example1.com redirects to example.com, visiting http://example1.com/pic.jpg will redirect to http://example.com/pic.jpg.

Click Add.

To test the redirect, click the link under the Directory column in the current redirects table. If it's set up correctly, the system sends you to the target domain with a confirmation message. Click Go Back to return to the interface.

Note

To create a redirect where the original domain stays in the browser's address bar, create a subdomain and point it to the domain you want from the Domains interface.

Redirects through third-party applications

When you add a redirect from the cPanel interface, the system places the redirect rules at the bottom of the .htaccess file. Some third-party applications (such as WordPress) may ignore these rules because they only read the rules in their own section of the file. In that case, the redirect may not work correctly, and you can configure it manually as a workaround.

Current redirects table

This table lists the current redirects in your account. You can search it by entering a word and clicking Go.

  • Domain: the redirected domain (ALL means all of the account's public domains).
  • Directory: the redirected directory; click the link to test it.
  • Regular Expression: the system redirects any URL that matches this expression.
  • Redirect URL: the target URL.
  • HTTP Status Code: the numeric code for the redirect status.
  • Type: permanent or temporary.
  • Match www (external link).: redirects only visitors who enter the www. prefix.
  • Wildcard: redirects all files in a directory to the same name in the new directory.
  • Actions: click Delete, then Yes to confirm, to remove the redirect.
Important

Most web browsers cache redirects; visitors may need to clear their browser cache to remove an old redirect from their browsers.

How is this guide?

On this page