How to Set Up URL Redirection in cPanel
URL redirection (or forwarding) is a useful technique that allows you to automatically send visitors and search engines from one website URL to another. This is incredibly helpful if you are moving your website to a new domain, changing a specific page layout, or forcing your site to open with or without the www. prefix.
At CeylonServers, you can configure custom redirects in seconds without writing any code. Follow these simple steps:
Step 1: Open the Redirects Tool
- Log in to your cPanel dashboard directly.
- Scroll down to the Domains section or search for "Redirects" in the top search bar.
- Click on the "Redirects" icon.
.png)
Step 2: Choose the Redirect Type
Under the Add Redirect section, you need to select the type of redirection:
- Permanent (301): Choose this option if you want to permanently move your traffic. This tells search engines (like Google) to pass all your old SEO rankings to the new URL.
- Temporary (302): Choose this if you are doing temporary maintenance and plan to bring the old URL back online shortly.
Step 3: Select the URL to Redirect
- https://(www.)?: Click the dropdown menu and select the specific domain or subdomain you want to redirect. If you want to redirect all domains on your account, select All Public Domains.
- The "/" field: If you only want to redirect a specific page (e.g.,
yourdomain.com/old-page), type the name of that page in the text box after the forward slash. If you want to redirect the entire website, leave this box completely empty.
Step 4: Enter the Destination URL
- In the "Redirects to" text box, enter the full web address where you want the traffic to go.
- Important: You must include the full protocol prefix, such as
https://orhttp://(e.g.:https://www.newsite.com). If you forget this prefix, cPanel will show an error.
.png)
Step 5: Configure www. Redirection Options
- Choose how you want cPanel to handle visitors who type
www.in their browser: - Only redirect with www: Only triggers if the visitor types
www.yourdomain.com. - Redirect with or without www (Recommended): Triggers the redirect no matter how the user types the link.
- Do Not Redirect www: Only triggers if the visitor leaves out the
www.entirely. - (Optional) Check the Wild Card Redirect box if you want to map internal folders exactly (e.g., redirecting
yourdomain.com/aboutstraight tonewsite.com/about)
Step 6: Save Changes
- Click the blue "Add" button.
- A success screen will confirm that your URL redirection is live instantly!
How to Delete a Redirect:
- If you ever want to stop the redirection:
- Scroll to the bottom of the same Redirects page to the Current Redirects table.
- Locate the redirect line and click the "Delete" button next to it.
- Confirm the removal, and your original URL will return to normal operation immediately.
Need Help with Complex Redirections? If you need advanced server rewriting loops (like editing your hidden .htaccess file directly) or if your domain forwarding is causing a "Too many redirects" loop error, please Open a Support Ticket from the top menu, and our systems team will optimize it for you!