{"id":2218,"date":"2019-07-09T19:58:05","date_gmt":"2019-07-09T19:58:05","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=ht_kb&#038;p=2218"},"modified":"2020-03-25T14:42:27","modified_gmt":"2020-03-25T14:42:27","slug":"subdomain-created-by-cpanel-for-addon-domains","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/subdomain-created-by-cpanel-for-addon-domains\/","title":{"rendered":"How to Hide the Subdomain Created by cPanel for Addon Domains?"},"content":{"rendered":"<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2223 size-full\" src=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain.png\" alt=\"\" width=\"1666\" height=\"370\" srcset=\"https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain.png 1666w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-300x67.png 300w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-768x171.png 768w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-1024x227.png 1024w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-50x11.png 50w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-60x13.png 60w, https:\/\/chemicloud.com\/kb\/wp-content\/uploads\/2019\/07\/subdomain-addondomain-100x22.png 100w\" sizes=\"auto, (max-width: 1666px) 100vw, 1666px\" \/><\/p>\n<p>As an example, if the main domain is <a href=\"https:\/\/chemicloud.com\"><em>chemicloud.com<\/em><\/a> and the addon domain is <em>webhosting.com<\/em>, the automatically created subdomain will be <em>webhosting.chemicloud.com<\/em>.<\/p>\n<p>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 <em>webhosting.chemicloud.com<\/em> will get a <strong>404 Not Found page<\/strong>.<\/p>\n<p>To do this, enter the following rules in the .htaccess file stored in your addon domain\u2019s web root directory:<\/p>\n<pre>&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On \r\nRewriteCond %{HTTP_HOST} webhosting.chemicloud.com$ \r\nRewriteRule ^(.*)$ \"https:\/\/chemicloud.com\/404\" [R=301,L] \r\n&lt;\/IfModule&gt;<\/pre>\n    \t\t<div class=\"hts-messages hts-messages--info   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tPlease make sure to update the above rules to correspond with your domain name and addon domain.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p>Alternatively, you can achieve similar results by simply pointing the subdomain A record to a non-working IP address &#8211; something like <strong>1.1.1.1<\/strong>. If you want to find out on how to manage your DNS with cPanel, just check <a href=\"https:\/\/chemicloud.com\/kb\/article\/update-dns-record\/\">this article<\/a>.<\/p>\n<p>If you notice any problems or if you need any help, please do not hesitate to contact at any time by <a href=\"https:\/\/lab.chemicloud.com\/submitticket.php\">opening a ticket<\/a> from your client area or in LiveChat &#8211; we are 24\/7 online!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[190],"ht-kb-tag":[],"class_list":["post-2218","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-domains"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=2218"}],"version-history":[{"count":8,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2218\/revisions"}],"predecessor-version":[{"id":2321,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/2218\/revisions\/2321"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=2218"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=2218"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=2218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}