Extra names and subdomains
One website can answer on more than one name. You registered mycompany.com, later mycompany.co.uk as well, and you want both to show the same site. Or you have mycompany.com and want shop.mycompany.com beside it as a separate webshop. Those
Written for: Customer, Reseller, Administrator
One website can answer on more than one name. You registered mycompany.com, later mycompany.co.uk as well, and you want both to show the same site. Or you have mycompany.com and want shop.mycompany.com beside it as a separate webshop. Those are two different things, and the panel keeps them apart.
- An extra name belongs to a website that already exists. No second site, no second folder of files, no second certificate. Visitors see the same pages — or they are redirected to the main name.
- A subdomain is a website of its own: its own folder, its own PHP version, its own certificate. The panel simply knows which site it belongs to, and shows it that way.
Coming from DirectAdmin: an extra name is what DA calls a pointer, and a subdomain is a subdomain there too. A migration carries both across — you do not have to recreate them.
Adding an extra name
Panel — open the account, go to Websites and click the website. The panel that slides open has an Extra names section with an Add a name button. There are four fields:
| Field | What it does |
|---|---|
| Extra name | the domain that should reach this website |
| What does this name do? | show the same site, or redirect (301) |
| Carry the mail too | mail to anything@extra-name arrives in the main site's mailboxes |
| Create a DNS zone | this server becomes a nameserver for the extra name |
The last two are on by default. That is deliberate: somebody arriving from DirectAdmin expects mail to the extra name to keep working, and this is exactly what makes it keep working.
Shell — the same thing, in one line:
corectl domain alias add mycompany.com mycompany.co.ukAnd this is what the list looks like afterwards:
corectl domain alias list mycompany.comDOMAIN ALIAS KIND MAIL ZONE SSL
mycompany.com www.mycompany.com alias on off active
mycompany.com mycompany.co.uk alias on on activeRedirecting instead of showing
Sometimes you do not want two names showing the same site. You have moved from an old name to a new one and want everybody — and Google — to end up on the new one. Then choose Redirect (301):
corectl domain alias add mycompany.com oldcompany.com --redirect$ curl -sI http://oldcompany.com/contact
HTTP/1.1 301 Moved Permanently
Location: https://mycompany.com/contactNote the path: /contact is kept. Somebody following a link to a deep page of the old name lands on that same page of the new name, not on the front page.
"Waiting for DNS" — what that means
An extra name can say waiting for DNS instead of in certificate. That is not an error, and nothing is broken.
A certificate is only issued for names that point at this server right now. If you have just added the name and its DNS is still with your old provider, the certificate authority cannot check it. Rather than failing the whole certificate — including your main domain, which was doing fine — the name is skipped:
- your main domain keeps its valid certificate;
- the extra name already works over
http://; - no request is wasted at Let's Encrypt.
As soon as the DNS is right, the next request picks it up. That happens by itself at the nightly renewal, or you can start it yourself:
corectl ssl issue mycompany.com[corecp] mycompany.co.uk now points here and is included in the certificate
[corecp] requesting SSL for [mycompany.com www.mycompany.com mycompany.co.uk] ...
[corecp] certificate active for [mycompany.com www.mycompany.com mycompany.co.uk]One thing to know if you have a wildcard certificate: *.mycompany.com does not cover anything.mycompany.co.uk. That is a different main domain, so it is a separate name in the certificate. Subdomains of an extra name have to be added as extra names themselves.
Mail for an extra name
With Carry the mail too on, mail to any address at the extra name arrives in the mailbox with the same name on your main domain. info@mycompany.co.uk lands in info@mycompany.com. There is no second mailbox to create and nothing to configure.
If you do not want that — because the mail for that name belongs to a different company, say — switch it off:
corectl domain alias set mycompany.com mycompany.co.uk --mail offFrom then on the server refuses mail to that name at the door, with an error the sender sees. That is on purpose: mail that quietly disappears is worse than mail that is refused, because at least a refusal tells the sender to look elsewhere.
Making a subdomain
A subdomain is a name under your website: shop.mycompany.com, blog.mycompany.com, test.mycompany.com. In the panel you create it with the same button as any website — Add a website — typing the full name.
corectl domain add shop.mycompany.com --account myaccountIt then appears in the website list indented under its main domain, labelled subdomain, so you can see at a glance what belongs together.
A subdomain is a full website:
- its own folder —
domains/shop.mycompany.com/public_html; - its own PHP version — you can put the shop on 8.4 while the main site runs 8.5;
- its own certificate — automatically, like any other website;
- its own statistics, its own log files, its own backups.
One thing a subdomain does not get: mail of its own. Your main domain's mailboxes already cover the addresses people actually use, and a stray mail address on a subdomain mostly creates confusion. No hosting panel does this differently.
Removing a subdomain
corectl domain remove shop.mycompany.com --purgeThe main domain carries on. --purge also throws away the subdomain's files; leave it off and they stay, so you can recreate the subdomain later without having lost anything.
What is not here: hotlink protection
DirectAdmin and cPanel have a hotlink protection switch, meant to stop other sites from loading your images directly. CoreCP deliberately does not have that switch, and does not carry it over during a migration either.
The technique behind it looks at the referer field the browser sends. Since 2020 that field is shortened or missing in most browsers — with a privacy extension, behind a noreferrer link, in a PDF viewer, in a mail client. The result is that such rules block precisely the wrong visitors: your own customers, who then see an empty box where your product photo should be. And you only find out when somebody calls.
What does work, if somebody really is pulling at your bandwidth:
- signed links with an expiry, so a copied URL does nothing an hour later;
- a CDN with token protection, which does the same at the edge;
- a rate limit per IP address.
If you are coming from DirectAdmin, the migration report says so too: hotlink configuration is NOT carried over. Your .htaccess travels with your files, so the rules are still there — you can remove them at your leisure.
See also
- SSL and certificates — how your website's certificate works.
- Setting up email — mailboxes, aliases and forwarding addresses.
- Managing DNS records — if your DNS lives somewhere else.