You have probably noticed already that each addon domain you create in cPanel, comes with a designated subdomain. Unfortunately, there is no way to avoid the creation of the subdomain, but you can hide URL if you want to make sure that none of your visitors will know that your website is an addon domain.
As an example, if the main domain is chemicloud.com and the addon domain is webhosting.com, the automatically created subdomain will be webhosting.chemicloud.com.
To hide the subdomain, you can choose to redirect the subdomain to a Not Found page, using .htaccess rule so any visitor that will visit webhosting.chemicloud.com will get a 404 Not Found page.
To do this, enter the following rules in the .htaccess file stored in your addon domain’s web root directory:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} webhosting.chemicloud.com$ RewriteRule ^(.*)$ "https://chemicloud.com/404" [R=301,L] </IfModule>
Alternatively, you can achieve similar results by simply pointing the subdomain A record to a non-working IP address – something like 1.1.1.1. If you want to find out on how to manage your DNS with cPanel, just check this article.
If you notice any problems or if you need any help, please do not hesitate to contact at any time by opening a ticket from your client area or in LiveChat – we are 24/7 online!