Redirects are commonly used in web development to redirect visitors from one web page to another. This can be useful for creating shorter, more memorable URLs or redirecting visitors from old pages to updated ones. In cPanel, you can easily add and remove redirects using the Redirects tool.
To add a redirect in cPanel, follow these steps:
-
Log in to your cPanel account.
-
Navigate to the Redirects tool. The location may vary depending on the theme you are using.
- Go to the Tools page and click on the Redirects icon in the Domains section:
- Go to the Tools page and click on the Redirects icon in the Domains section:
-
Under "Add Redirect," select the type of redirection you want to create: Permanent (301) or Temporary (302). The choice depends on whether you want the redirection to be permanent or temporary.
-
Choose the domain you want to redirect from and enter the web page you want to redirect in the "Redirects to" text box. This can be a page on your own website or a page on a different website.
-
Optionally, you can select the "www. redirection" option to specify how domains that include "www." should be redirected.
-
If you want to enable wildcard redirecting, select the "Wild Card Redirect" checkbox. This allows you to redirect an entire directory of files at once.
-
Click on the "Add" button to create the redirect.
To remove a redirect in cPanel, follow these steps:
- Log in to your cPanel account.
- Navigate to the Redirects tool, following the same steps as mentioned above:
- Under "Current Redirects," locate the redirect you want to remove and click on the "Delete" button.
- Confirm the deletion by clicking on the "Remove Redirect" button.
Remember that once a redirect is deleted, it cannot be modified. If you need to make changes to a redirect, you will need to delete it and create a new one.
By following these steps, you can easily add and remove redirects in cPanel to manage your website's URL structure and improve user experience.