Setting up URL redirects allows you to forward visitors from one web address to another. This is useful for site maintenance, domain changes, or directing traffic to updated pages. cPanel provides an easy-to-use interface to configure redirects without needing to edit .htaccess
manually, with some exceptions.
Accessing the Redirects Page
To set up or manage redirects in cPanel, follow these steps:
Step 1: Log in to your cPanel account.
-
If you need help logging in, refer to our guide: Accessing your hosting control panel (cPanel)
Step 2: Locate the "Redirects" button.
Adding a Redirect
Go to the "Add Redirect" section to create a new redirect:
Step 1: Choose the redirect Type.
-
Permanent (301): Recommended for SEO-friendly redirects when a page or domain has moved permanently.
-
Temporary (302): Used when a redirect is only needed for a short time.
Step 2: Select the domain or specific URL to redirect.
-
Choose a domain from the dropdown list.
-
If you want to redirect a specific page, enter the path (e.g.,
/old-page
).
Step 3: Enter the destination URL in the Redirects to field.
-
This is where visitors will be redirected.
-
Ensure the destination URL is correctly formatted (e.g.,
https://example.tld/new-page
).
Step 4: Choose whether to apply the redirect to "www. only," "non-www. only," or "both". We generally recommend both (second option).
Step 5: Check the box for "Wild Card Redirect" if you want all files in the directory to be redirected to corresponding files in the new location (recommended).
Step 6: Click Add to save the redirect.
Managing Existing Redirects
To view, edit, or remove existing redirects:
Step 1: Scroll down to the "Current Redirects" section.
-
A list of existing redirects will be displayed.
Step 2: To remove a redirect, click Delete next to the entry.
Step 3: To modify a redirect, delete it first, then create a new one with the updated details.
Notes
-
Redirects are stored in the
.htaccess
file of your website. -
New redirects will always be added at the end of the
.htaccess
file. -
If your redirects are not working, ensure that your
.htaccess
file is not overridden by other settings. -
Moving the redirect rules at the top of the
.htaccess
file can usually prevent other rules from overriding them. -
For complex redirects, you may need to edit the
.htaccess
file manually and consult with your web developer.
For more technical details, you can refer to the official cPanel documentation: Redirects in cPanel
Updated by SP on 05/02/2025