Setting up page redirects
cPanel includes a tool to set up redirects for pages and directories (folders) without the use of PHP. To use the tool, do the following:
- Sign in to your My Services page.
- Click the Web Hosting link.
- Click Redirects in the Domains module.
- In the Type dropdown, select the type of redirect you want to use, either Permanent (301) or Temporary (302). Learn more.
- In the field following the / box, enter the path within the public_html folder for the page or folder that you want redirected. To set up a redirect for the entire site, leave this field blank.
Note: Do not include the full URL for the page being redirected. For example, if you want to redirect the file test.html in the folder home/public_html/test, you will enter it as test/test.html. Learn more about the public_html folder and the File Manager here. - In the Redirects to field, enter the full URL for the page or folder that you want the traffic redirected to.
- If you want the redirect to only occur for the root domain (without www.) or the www. subdomain, change the http?://(www)? dropdown from ** All Public Domains** to your domain name.
Then select the applicable redirect option under www. redirection:.
- If you want all of the files within a folder to be redirected, checkmark the Wild Card Redirect box. This will also redirect all files in sub-folders of the folder being redirected.
Note: You cannot use this to redirect the root directory to another directory on your website. This option can only be used with the root directory when redirecting traffic to another website. - Click the Add button.
See Also: