Looking a way to manage and add domain in cPanel?
Then this article is for you, here we have prepared a complete guide on “how to add and manage domain in cPanel?”
Domain handling in cPanel is easy, and everyone can do the necessary actions. You can add an addon domain; create subdomains, aliases, or redirects with just a few clicks. In this article, I will show you how to do these tasks.
Adding and modifying Addon Domain in cPanel
Addon domains are additional domain names that can be added as subdomains of the original domain name. One can use them to serve more domain names from the same web hosting account.
To add a new addon domain in cPanel just simply click on the Addon Domain link on the main screen of the software. Enter your new domain name without www or HTTP, like newdomain.com. The system will automatically fill in the subdomain and document root text fields. It is recommended not to modify the logic auto-fill values.
If you want to create an FTP account for the newly added domain name, check to Create an FTP account associated with this Addon Domain. If you check it, 3 more text fields appear which allow you to set the FTP user name and password.
Finally, press Add Domain button so the addon domain can be added to your cPanel account. This addon domain subpage will list all of your addon domains where you can edit or delete them.
If you want to modify an addon domain in cPanel, just go to the Addon domains subpage and select the desired domain name. To change the document root, click on the pencil icon next to the current root path. You can edit the root in a popup window, where you should click on the Change button to save the changes.
On this interface, you can set or modify the redirection of an addon domain too. Just click on the Manage redirection link in the related domain’s row and a new window will appear. Here you can set a new or modify an already exist redirection by changing the source URL. To save the changes, you should click on the Save button.
Adding and modifying Subdomains in cPanel
A subdomain is a next level in DNS (Domain Name System) and it is always under the main domain name. For instance, if you have a mysiteurl.com domain name, news.mysiteurl.com is a subdomain of it, and surprisingly, www.mysiteurl.com is a subdomain of mysiteurl.com domain name.
You can add subdomains in cPanel very easily; you just need to click on the Subdomains link on the main panel of the software. By clicking on it, you will be redirected to a new screen where you should enter the name of the subdomain. Choose the related domain name from a dropdown menu, and set the document root, where you can find the auto-filled default value. Finally, click on Create button.
On the same interface where you can add new subdomains, you can also see your subdomains that already exist. To change a subdomain’s document root, you should click on the pencil icon next to the current root. A new popup window appears where you can modify the root. You can save the changes by clicking on the Change button or discard them with the Cancel button.
At the end of each subdomain’s row, you can see a Manage redirection link along with another pencil icon. To set or modify the redirection, you should click on that link which opens a new window. In the new window, you should enter the redirect URL and click on the Save button to finalize it. You can discard the changes and go back to the previous screen by clicking on Disable Redirection button.
To remove a Subdomain you should click on the Remove link or on the trash icon in the same row. By clicking on any of them, you will be redirected to a deletion subpage. The system will show a notification, asking you if you are sure that you want to permanently remove the desired subdomain. If you click on the Delete Subdomain button, your subdomain will be removed permanently. If you click on Cancel, you will be redirected to the previous screen.
Adding and modifying Aliases in cPanel
Aliases are domain names that are used as alternatives to your domain name. For example, you can set that people typing the myaliasdomain.com domain name arrive at your original mydomain.com.
To set aliases in cPanel, it is important to make the same measures as you should do with adding a new domain name. First, you should register the alias domain name at a valid registrar. Secondly, you should edit the alias domain name’s name servers at the registrar and point the name servers to your web server where your cPanel is active.
Once the name servers’ data is refreshed in the global Domain Name System, you can set the aliases. The refreshing may need up to 24 hours.
To set aliases, you should start at the main screen of cPanel. Click on Aliases and you will be redirected to a new screen. Here you can add your new alias, by simply entering the domain name in a text field. Add your alias by pressing the Add domain button.
Once your new alias is added, click on Manage Redirection link or pencil icon to set the redirection, a new subpage will appear again. Here you can enter the redirection url and save it by clicking on Save button. You can remove the already set redirection by clicking on Disable Redirection button.
To remove an alias, click on Remove link or trash icon in alias domain name’s row. The system will notify you about successful removal via an info message.
Adding and modifying Redirects in cPanel
Redirects are redirecting the visitors (and of course the web crawlers) to another URL. This is a useful function when your website is moved to another domain name. Or you just need to redirect the visitors temporarily to a new website (for example your website is under maintenance and will be back soon).
There are two kinds of redirects, permanent and temporary redirects. Both of them have so-called HTTP codes, which notify the web browser about redirection so it can perform the necessary step (forwards to you to the new destination). Permanent redirection’s HTTP code is 301. So the redirection type is often known as the 301 redirects. Temporary redirection’s HTTP code is 302, so it is known as the 302 redirects.
The difference between using 301 or 302 redirects is very important and applying them in the wrong way can totally destroy your website’s traffic. When you use the 302 redirect method, the visitors will be redirected automatically to the new URL. Meantime web crawlers, like Google robots, won’t delete your original website’s URL from the Google database.
By using the 301 redirects, the visitors will be still redirected to the new URL. But this type of redirection means to Google and other bots that the old URL does not exist anymore and they can change the old URL to the new one in the database. With this step sooner or later all of your old URLs will be removed from Google’s database and only the new URLs will be indexed.
If your content is only temporarily moved to a new site and you want to use your old web address, never use the 301 redirects. Using wrong redirect methods could cause a mess in Google’s index, delivering you significantly fewer visitors and destroying your whole business.
After you have learned what the difference between 301 and 302 redirects is, you can set your redirection in cPanel. For this, click on the Redirects link on the cPanel main screen. You will be redirected to a new interface.
Here you can set the redirect type, choosing type 301 or 302. In the next dropdown menu, you can select which domain or subdomain should be redirected. You can also select that the redirection should be applied on all of your available domains and subdomains.
In the next text field which starts with a slash character, you can set if an exact folder or file should be redirected. For example, if you want to redirect your myurl.com domain name, you shouldn’t enter anything into this text field. If you want to redirect your myurl.com/foldername folder, you should enter the folder name string to this text field.
Next, you should enter the destination URL. This will be the new place where the redirection sends your visitors.
The next solution that you should consider is www redirection. If you want to redirect only those visitors to your new URL, who start your URL with www, then choose the Only redirect with www. option. Also, you don’t want to redirect those people, then choose the Do not redirect www. If you want to redirect everybody, choose the Redirect with or without www option. The latter option is the most logical choice, which is why it is set by default.
The last option is a checkbox, named Wild Card Redirect. If you choose this option, then the redirection redirects all files to the same filename in the new location. For example, you can use this option if you have many files in the same folder, but you don’t want to set one single redirection for each of them.
By checking this box a person who is looking for mysite.com/page1 will be redirected to mynewsite.com/page1 automatically. Even if you made a redirection from mysite.com to mynewsite.com only.
On the same interface, where you can add new redirects, you can see your already set redirects too. Here you can delete them by clicking on the Delete link or the trash icon.
Finally…
At this point you should know everything about how to add-on domain, manage sub-domains and create redirects properly in cPanel.
If you might looking for a reliable cPanel web hosting provider. Please check out our article on “5+ Best Web Hosting Providers” or “7 Best Web Hosting Companies 2020“