Redirecting Domains in cPanel
A domain redirect is a way to forward visitors from one domain or URL to another. In cPanel, you can easily set up domain redirects using the Redirects feature. This can be useful if you want to redirect traffic from one domain or URL to another, such as when a page or domain is moved, or when you want to point multiple domains to the same website.
Here’s a step-by-step guide on how to set up domain redirects in cPanel:
Step 1: Log in to cPanel
- Open your web browser and go to your cPanel login page (typically
http://yourdomain.com/cpanelorhttp://yourdomain.com:2083). - Enter your username and password to log into your cPanel account.
Step 2: Access the Redirects Section
- Once logged into cPanel, scroll down to the Domains section.
- Click on the Redirects icon to open the domain redirection tool.
Step 3: Set Up a Domain Redirect
-
Choose the Type of Redirect:
- You’ll have the option to set up a Permanent (301) or Temporary (302) redirect:
- Permanent (301): This is the most common type of redirect. It tells search engines and browsers that the redirection is permanent, and they should update their indexes accordingly.
- Temporary (302): Use this if the redirection is temporary. This doesn’t affect search engine indexing as much as a permanent redirect.
- You’ll have the option to set up a Permanent (301) or Temporary (302) redirect:
-
Select the Domain:
- From the http://(www.)? drop-down menu, select the domain you want to redirect. If you have multiple domains, choose the one that you want to forward.
-
Enter the URL Path (Optional):
- If you want to redirect a specific page or directory, enter the path after your domain name. For example, if you want to redirect
http://yourdomain.com/old-pageto another URL, enterold-pagein this field. - If you want to redirect the entire domain (e.g.,
yourdomain.com), leave this field blank.
- If you want to redirect a specific page or directory, enter the path after your domain name. For example, if you want to redirect
-
Enter the Destination URL:
- In the Redirects to field, enter the full destination URL where you want the visitors to be sent. For example, if you want to redirect your domain to
http://newdomain.com, enter the full URL in this field.
- In the Redirects to field, enter the full destination URL where you want the visitors to be sent. For example, if you want to redirect your domain to
-
Select Redirect Type:
- With or without "www": You can choose whether to include or exclude the "www" in the redirection. If you select “Only redirect with www,” it will only redirect traffic when the "www" prefix is included. If you select "Redirect with or without www," both versions of the domain will be redirected.
-
Click "Add":
- Once you’ve filled out the fields, click the Add button to set up the redirect.
Step 4: Verify the Redirect
- After creating the redirect, visit the URL you want to redirect from. You should be automatically redirected to the destination URL you specified.
Step 5: Manage or Remove Redirects (Optional)
- To view existing redirects, go back to the Redirects section in cPanel. Here you will see a list of redirects that have been set up.
- To edit or remove a redirect, click Edit or Delete next to the redirect you want to modify or remove.
Additional Tips:
- Wildcard Redirects: If you want to redirect every page in a domain to the same page on the destination domain (e.g.,
http://yourdomain.com/anythingtohttp://newdomain.com/anything), you can enable the Wildcard Redirect option. This will ensure that all pages under the original domain redirect to the same pages on the new domain. - HTTPS Redirects: If you’re redirecting an HTTP domain to an HTTPS domain, make sure your SSL certificate is installed on the destination domain for a secure redirection.
- DNS Changes: In some cases, DNS changes may be required for the redirect to work properly. If you're redirecting a full domain to another, ensure that the domain’s DNS is configured correctly to avoid conflicts.
By following these steps, you can set up and manage domain redirects in cPanel with ease. This tool helps ensure visitors can find your content even after domain changes or restructuring.