URL forwarding or redirection is a common practice especially if you want your website to be available in more than one domain name. Sometimes, you might need to purchase all top-level domain names to safeguard your trademark.
For instance, if you site is ’example.com’ , you might see it fit to buy ‘example.net’ and ‘example.org’ to avoid someone else from buying these related domain names and tarnish your brand.
In this guide, we will focus on the steps that you should follow to redirect a full domain or even a single web page to another URL right in your cPanel account.
Prerequisites
- A domain name e.g. www.example.com.
- Web hosting account that supports Cpanel.
- Cpanel username and password.
- Source URL that you are redirecting.
- Destination URL.
Step 1: Login to your cPanel account
First, log to your cPanel account by visiting the primary domain name associated with your hosting account and appending ‘/cpanel’ at the end e.g. ‘www.example.com/cpanel’
Then, enter your username and password to proceed.
Step 2: Locate the redirect icon on the cPanel dashboard
On the search box, type ‘Redirects’ and click the icon that appears as shown on the image below:
Step 3: Create a redirect rule
On the next screen, you will see an option for customizing and adding a redirect rule. There are two types of redirects; temporary (302) and permanent (301).
Permanent redirects will force search engines to crawl the new link and drop the old URL. For visitors, this will cause an update to bookmarks. In a temporary redirection, search engines will continue indexing the old site and no bookmarks will be updated.
You can choose to redirect a single domain or all domains hosted on your cPanel account.
In most cases, you will be redirecting a single domain so select it from the list. Then, enter the exact URL that you want to redirect from alongside the field name labeled ‘/’. For instance, if you want to redirect www.example.com/login to www.example.org/login, just enter ‘login’ on that field.
Next, customize whether you want to redirect URLs with or without ‘www’ and click ‘Add’ at the bottom of the screen. Please note, all destination URLs should start with a protocol (e.g. ‘http://’ or ‘https://’ )
In our example above, any user trying to visit the URL www.example.com/login will be automatically redirected to www.example.org/login
Conclusion
cPanel offers a great way for customizing redirects on your websites. However, if you have a lot of rules that you want to add on your site, you might consider creating a ‘.htaccess’ file under the root of your website for more flexibility. However, cPanel redirects will work for most cases especially when you want to serve the same web content on different websites hosted under your cPanel account.
Check out these top 3 cPanel hosting services:
- Want info about best web hosting? Clicking this link can be of great help.