---
title: How to Hide the Subdomain Created by cPanel for Addon Domains?
description: "🌐This guide is also available in Arabic[← اقرأ بالعربية](https://kb.tarweig.com/docs/%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a5%d8%ae%d9%81%d8%a7%d8%a1-%d8%a7%d9%84%d9%86%d8%b7%d8%a7%d9%82-%d8%a7%d9%84%d9%81%d8%b1%d8%b9%d9%8a-%d8%a7%d9%84%d8%aa%d9%84%d9%82%d8%a7%d8%a6%d9%8a-%d9%84%d9%84/) 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…"
url: "https://kb.tarweig.com/en/docs/subdomain-created-by-cpanel-for-addon-domains/"
updated: "2026-10-11"
category: Hosting Management / cPanel
---

# How to Hide the Subdomain Created by cPanel for Addon Domains?

🌐This guide is also available in Arabic[← اقرأ بالعربية](https://kb.tarweig.com/docs/%d9%83%d9%8a%d9%81%d9%8a%d8%a9-%d8%a5%d8%ae%d9%81%d8%a7%d8%a1-%d8%a7%d9%84%d9%86%d8%b7%d8%a7%d9%82-%d8%a7%d9%84%d9%81%d8%b1%d8%b9%d9%8a-%d8%a7%d9%84%d8%aa%d9%84%d9%82%d8%a7%d8%a6%d9%8a-%d9%84%d9%84/)

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.

![](https://kb.tarweig.com/wp-content/uploads/kb-media/2019/07/subdomain-addondomain.png)

As an example, if the main domain is [*tarweig.com*](https://tarweig.com) and the addon domain is *webhosting.com*, the automatically created subdomain will be *webhosting.tarweig.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.tarweig.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.tarweig.com$
RewriteRule ^(.*)$ "https://tarweig.com/404" [R=301,L]
</IfModule>
```

Please make sure to update the above rules to correspond with your domain name and addon domain.

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](https://kb.tarweig.com/en/docs/update-dns-record/).

If you notice any problems or if you need any help, please do not hesitate to contact at any time by [opening a ticket](https://clients.tarweig.com/submitticket.php) from your client area or in LiveChat – we are 24/7 online!
