Setting up redirects in cPanel helps to send visitors from one URL to another.Follow these steps to set up redirects in cPanel.
- Log into cPanel
Go into your cPanel account first. Go to yourdomain.com/cpanel and enter your username and password to log in. - Locate the Redirects Tool
Locate the "Domains" area in your cPanel dashboard after logging in. Click on the "Redirects" icon. - Choose Redirect Type
You will see two types of redirects:- Permanent (301): Use this if the URL has changed permanently. This instructs search engines
to update their links with the new URL. - Temporary (302): Use this if the URL change is temporary. This keeps the original URL in
search engines.
Depending on what you require, choose "Permanent (301)" or "Temporary (302)".
- Permanent (301): Use this if the URL has changed permanently. This instructs search engines
- Enter Redirect Information
- In the "Type" dropdown, choose the type of redirect you want (Permanent or Temporary).
- In the "http://(www.)?" field, choose the domain you want to redirect from.
- In the next field, enter the path you want to redirect from. For example, if you want to redirect "yourwebsite.com/old-page" to "yourwebsite.com/new-page", enter "old-page" here.
- In the "Redirects to" field, enter the full URL of the destination where you want to send visitors. For example, "http://yourwebsite.com/new-page".
- Set Options
By choosing the right option, you can decide whether you wish to redirect with or without "www." Redirect with or without www.: Using "www." will not affect the redirection. Do Not Redirect www ,this will not redirect if the user types "www." before the domain. To redirect all files within a directory to the same file names in the new directory, you canoptionally click the "Wildcard Redirect" box. - Add the Redirect
Click the "Add" button to create the redirect. You will see a confirmation message that your redirect has been successfully added. - Test the Redirect
Open your web browser and enter the URL you redirected from. Ensure it redirects to the new URL correctly.
Setting up redirects in cPanel is essential for managing your website's URL structure efficiently.