# urbestack-domain-add

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-domain-add --name DOMAIN --user NAME [--parent DOMAIN] [--system] [--php-version 8.4] [--template NAME] [--dry-run]
```

## Description

Adds a hosted domain to a customer account. UrbeStack creates its document root, Apache virtual host and PHP-FPM pool, and updates DNS and mail configuration. The name must be unique among domains and aliases on this server. Subdomains count toward the customer's package limit for domains.

Use --parent to add a subdomain. The name must be below the parent's name in DNS, and both must belong to the same customer. Choose a standalone domain as the parent. Deleting the parent also deletes the subdomain.

Use --php-version to select a version such as 8.4. The version must be installed and available for new domains. Wait for any PHP installation to finish before selecting a version. --template selects the Apache virtual host template and defaults to default. --dry-run previews the configuration changes as a diff.

Use --system to host reserved names, the server's own names, names above or below them, or names in the server's own DNS zones. This option is also required for names above or below another account's domain or alias and for names that overlap another server's zone in the DNS distribution network. If this server holds the name's zone for a DNS client, --system takes over the zone for the new domain and blocks further updates from that client.

When mail.unpointed_domains is set to refuse, the name must already point to this server unless you use --parent or --system.

## Same in the API

- [POST /domains](https://urbestack.com/docs/api/post-domains.md): Add a hosted domain

## Command family: domain

- [urbestack-domain-alias-add](https://urbestack.com/docs/commands/urbestack-domain-alias-add.md): Adds an alias to an existing domain so Apache serves both names from the same document root.
- [urbestack-domain-alias-del](https://urbestack.com/docs/commands/urbestack-domain-alias-del.md): Removes an alias and updates Apache, DNS and mail configuration.
- [urbestack-domain-del](https://urbestack.com/docs/commands/urbestack-domain-del.md): Deletes a domain and its subdomains, along with their Apache virtual hosts, PHP-FPM pools, mailboxes, certificates and statistics.
- [urbestack-domain-list](https://urbestack.com/docs/commands/urbestack-domain-list.md): Lists domains in name order or returns a single domain by name.
- [urbestack-domain-log](https://urbestack.com/docs/commands/urbestack-domain-log.md): Reads a domain's access, error or PHP error log.
- [urbestack-domain-modsec-set](https://urbestack.com/docs/commands/urbestack-domain-modsec-set.md): Sets the ModSecurity mode or the owner's choice for a domain.
- [urbestack-domain-modsec-show](https://urbestack.com/docs/commands/urbestack-domain-modsec-show.md): Shows the server's ModSecurity mode, the administrator's mode for the domain, the owner's choice and the mode in force.
- [urbestack-domain-redirect-add](https://urbestack.com/docs/commands/urbestack-domain-redirect-add.md): Adds an HTTP redirect from a path on a domain.
- [urbestack-domain-redirect-del](https://urbestack.com/docs/commands/urbestack-domain-redirect-del.md): Removes redirects for a source path on a domain.
- [urbestack-domain-set](https://urbestack.com/docs/commands/urbestack-domain-set.md): Changes settings for an existing domain and synchronizes the DNS zones UrbeStack manages.
