# Domains and subscriptions

> Add a website, choose its own or a shared webspace and document root, set aliases and a preview address, switch a site off, and change many domains at once.

Source: https://www.berthpanel.app/library/domains-and-subscriptions/ · Category: sites · Updated: 2026-10-30

Every website in Berth is a **domain** that belongs to a **subscription**. This article explains how the two relate, how to add a domain from the panel or the CLI, and what you can change afterwards: document root, aliases, preview address, switching a site off and bulk changes across many domains.

## Customers, subscriptions and domains

Berth uses three levels, the same way Plesk does:

- A **customer** is a person or organisation with one or more panel logins.
- A **subscription** is a hosting account on a package. It has its own Linux system user, its own PHP-FPM, its own resource slice and quota, and the limits of its package (domains, mailboxes, databases, disk space). See [Customers and packages](https://www.berthpanel.app/library/customers-and-packages/) and [Isolation](https://www.berthpanel.app/library/isolation/).
- A **domain** is a website (and usually a mail domain) inside a subscription. A subscription can hold several domains; each one counts towards the package's domain limit.

On disk, a domain's files live under `/var/www/vhosts/<domain>/`, with the website in `httpdocs/` by default. The layout matches Plesk, so files, scripts and tools that expect that structure keep working. [On-disk layout](https://www.berthpanel.app/library/on-disk-layout/) has the full picture.

## Add a domain

The domain must point at the server in DNS before you can request a certificate for it. Everything else works before that, and a preview address (below) lets you look at the site first.

1. Go to *Domains → Add*. The page is called "Add domain".
2. Enter the domain name without `www`, for example `example.com`.
3. Choose the **customer** and the **package**. Leaving the customer empty creates a new customer named after the domain.
4. Choose whether the domain gets **its own subscription** or joins an **existing subscription** of the same customer (an extra domain under the same system user).
5. Optionally choose where the website's files live:
   - **its own webspace** (the default), or
   - **the webspace of another domain in the same subscription**, like an additional domain in Plesk.
6. Optionally change the **document root**. The default is `httpdocs`; frameworks such as Laravel and Symfony want `httpdocs/public`.
7. Tick *Request a certificate now* for HTTPS with Let's Encrypt, and HSTS if the site is ready for it.
8. Click **Add**.

On the command line, customer, subscription and first domain are one step. Running it again is safe:

```bash
berth customer create --domain example.com --plan basis --customer acme \
  --docroot httpdocs/public --tls --email admin@example.com
```

To add a domain to an existing subscription, name its system user with `--sysuser`. To put the files in another domain's webspace, add `--webspace`:

```bash
berth customer create --domain example.nl --sysuser acme --webspace example.com --tls --email admin@example.com
```

Other useful flags are `--hsts`, `--no-redirect` (keep plain HTTP working on port 80) and `--ip` / `--ipv6` for a site that needs its own address.

> [!NOTE]
> Customers and resellers can add domains themselves while their package has room. They see the same form, limited to their own subscriptions.

## Subdomains

A subdomain such as `shop.example.com` is an ordinary domain in Berth. Add it like any other domain, in the same subscription, and choose either its own webspace or a folder inside the parent's webspace. There is no separate "subdomain" object, so everything in this library about domains applies to subdomains too.

## Domain-claim protection

On a shared server, the domain you add decides who receives its mail and who can request its certificates. Berth therefore refuses some names when a customer or reseller adds them (an administrator can still add them):

- a public suffix such as `co.uk`,
- the domain of a large mail provider,
- a name of the server itself: its host name, the mail and webmail names, the Adminer address, the panel address, the base of preview addresses, or their parent domain,
- a parent domain or subdomain of a domain that belongs to another customer,
- the mail domain of a login, customer or reseller that is not theirs,
- a domain that was deleted less than 30 days ago and is still reserved for another customer (see [Reserved for 30 days](#reserved-for-30-days)).

This stops one customer from catching another customer's password-reset mail or certificates. In addition, the root agent keeps its own register of which subscription serves which domain, so a configuration for a domain can only be written for the subscription that owns it.

## The domain page

*Domains → example.com* is the home of one website. It has tabs for *Overview, Mail, Files, Backups, Statistics* and groups the settings on the overview in sections:

| Section | What you find there |
|---|---|
| *Website* | Document root, IP address, preview address |
| *Certificate and HTTPS* | Request, renew or upload a certificate; see [Certificates](https://www.berthpanel.app/library/certificates/) |
| *Settings* | Names and aliases, PHP, HTTPS redirect and HSTS, security headers |
| *Speed* | PHP processes, page cache, object cache, static files, CDN; see [Caching and CDN](https://www.berthpanel.app/library/caching-and-cdn/) |
| *Security* | WAF, write lock, per-visitor limits, geoblocking, hotlink protection; see [Web server settings](https://www.berthpanel.app/library/web-server-settings/) |
| *Developers* | Environment variables and secrets, custom web server rules |
| *Danger zone* | Move, switch off, delete |

Buttons at the top lead to logs, scheduled tasks, Git, apps, containers, WordPress and the other tools of the domain.

**Test connection**, also at the top, checks from the server what a visitor runs into: whether the name resolves, whether the port answers, whether the certificate is right and whether the mail server introduces itself properly. Customers can use it too, so they can rule out the server before they call you.

## Change the document root

Under *Website → Document root*, pick another folder inside the webspace, for example `httpdocs/public`. The files stay where they are; only the web server configuration changes.

```bash
berth domain docroot example.com httpdocs/public
```

## Aliases and the preferred name

Under *Settings → Names* you add extra names for the same website, such as `www.example.com` or an old brand domain, and choose the **preferred name**: with or without `www`. The other name redirects to it, so search engines see one address. Each alias must point at the server in DNS.

```bash
berth domain alias --domain example.com --add www.example.com --add example.nl
berth domain alias --domain example.com --remove example.nl
```

## Preview address

A preview address lets you (or your customer) look at a site before DNS is switched, which is handy during a migration. Turn it on under *Website → Preview address*. The site gets an extra address that already points at the server; search engines ignore it.

```bash
berth domain preview --domain example.com --on
```

By default the address is under `sslip.io`, a public service that resolves a name containing an IP address to that IP. An administrator can set an own base under *Settings → Panel → Preview addresses*, for example `preview.example.nl`, after creating a wildcard record `*.preview.example.nl` that points at the server.

## Give a domain its own IP address

By default a domain uses the subscription's address, which is usually the server's main address. An administrator can give one domain its own IPv4 (and optionally IPv6) address of the server:

```bash
berth domain ip --domain example.com --ipv4 203.0.113.25 --ipv6 2001:db8::25
berth domain ip --domain example.com        # back to the subscription's address
```

For a whole subscription, use `berth subscription ip`.

## Switch one website off

Sometimes a single site has to go offline, for example after a compromise or an unpaid invoice, without suspending the whole subscription. Under *Danger zone → Switch website off*:

- visitors see a suspension page,
- the domain's apps are stopped,
- optionally its mailboxes are closed as well,
- files, databases, FTP and SSH stay as they are, so the site can be cleaned up or exported.

```bash
berth domain disable --domain example.com --reason "Being cleaned after a malware find"
berth domain disable --domain example.com --mail     # also close the mailboxes
berth domain enable  --domain example.com
```

The reason is visible to both the administrator and the customer. To suspend everything of a subscription (websites, SSH/SFTP, cron, FTP and mail), use `berth subscription suspend` instead.

## Move a domain to another subscription

*Danger zone → Move to another subscription* moves a domain with its files, PHP pool and access. Because a move hands one customer's files to another subscription, the button in the panel only creates a **request**. Root approves or rejects it on the server, or through [rescue mode](https://www.berthpanel.app/library/rescue-mode/):

```bash
berth domain move-requests
berth domain move-approve <id>
```

After approval the panel carries out the move. A compromised panel process therefore cannot pull a customer's files into a subscription of its own.

## Delete a domain

*Danger zone → Delete domain* removes the configuration. Administrators and resellers can tick *Also delete files, logs and certificate*; on the command line that is `--purge`. A customer who deletes a domain keeps the files; the hosting company removes them.

```bash
berth domain remove --domain example.com
berth domain remove --domain example.com --purge
```

Make sure a recent backup exists first; see [Backups overview](https://www.berthpanel.app/library/backups-overview/).

### Reserved for 30 days

After deletion the name and its aliases stay reserved for the same customer for 30 days, because DNS often still points here. During that time no other customer can add the name, so nobody can catch the previous owner's mail or request a certificate for it; that customer (or their reseller) and an administrator can add it again. Reservations are listed and released on the command line:

```bash
berth domain reservations                       # names that are still reserved
berth domain release --domain example.com       # free one early for someone else
```

## Change many domains at once

*Domains → Several at once* applies one action to a selection of domains, with the outcome per domain:

- set the PHP version,
- request certificates (in batches),
- switch the HTTP-to-HTTPS redirect or HSTS on or off,
- switch the page cache on or off,
- apply the recommended static-file cache times, or go back to the defaults,
- switch the WAF on, or to detection only.

```bash
berth domain bulk --action php --value 8.4 --domains example.com,example.nl
berth domain bulk --action hsts_on --all
```

## When a domain is half created

Creating a domain touches several services. If one step fails (a DNS check, a certificate, a service reload), the domain is marked as unfinished instead of being left half-configured. The panel retries unfinished domains in the background; you can also do it yourself:

```bash
berth domain retry --domain example.com        # create it again from the stored settings
berth domain reprovision --domain example.com  # re-render its configuration
```

Each change goes through the same render, validate and swap pipeline as everything else; see [How changes go live](https://www.berthpanel.app/library/how-changes-go-live/).
