Did you move your site to a new domain? Do you want to redirect accesses to a removed folder to the main page? the cPanel Redirect allows you to set such redirects.
To setup a redirect follow the steps:
- First, log into your cPanel account
- Look for Redirects (DOMAINS section)
- Now we will add the redirect. Choose the Type you want Permanent(HTTP code 301) or Temporary(HTTP code 302)
- Choose if the redirect should work for all the domains or for a single domain(select it from the drop-down list)
- Then select the directory or file you want to redirect from.
- Enter the destination URL.
- Choose if you want to redirect with/without/and www. Also, you have a Wild Card Redirect option. With this option checked the server will redirect all files within a directory to the same filenames in the destination directory.
- Click the Add button
A short video tutorial:
The cPanel Redirect tool uses the .htaccess file. Take care if you want to edit/delete this file. For advanced info on the directives you can use in the .htaccess file, please visit Apache Module mod_rewrite page.