Skip to Content

Domains

Manage custom domains for your project. SSL certificates are provisioned automatically via Let’s Encrypt once DNS propagates.

All domain commands target the active site stored in the directory’s .ghayma.json; in a workspace, ghayma domain create takes --site <slug>.

ghayma domain create

Attach a custom domain to the current project’s active site, or to the site you name with --site.

ghayma domain create my-app.com # Attach to a named site, from anywhere in a workspace ghayma domain create --site admin admin.my-app.com

--site takes a slug, a name or an id. Without it, domain create uses the site of the directory you’re in — and at a workspace manifest root it asks which site you mean, or fails rather than guess on a non-interactive shell.

Output:

✅ Domain 'my-app.com' added to my-project 📋 Next steps: 1. Add an A record in your DNS: my-app.com → 203.0.113.10 Right now: it resolves to 198.51.100.7, which is not this platform. 2. Remove any AAAA (IPv6) record for it: Ghayma serves IPv4 only 3. SSL is provisioned automatically once DNS points here; no redeploy needed

The address comes from the platform, and the Right now: line says what the domain’s DNS answers at the moment. When the domain already points here, the command says 🌐 DNS already points here; SSL is provisioned automatically. instead. No redeploy is needed: the domain goes live on its own once DNS points here.

CLI versions before v0.11.11 print an outdated address in this step. Update the CLI, or copy the address from the Dashboard.

Then configure your DNS. 203.0.113.10 is an example — copy the real IPv4 address from the command’s output, or from your Dashboard (Project → Domains → Add domain):

TypeNameValue
A@ or subdomain203.0.113.10 (example)

One A record, and no AAAA. Ghayma serves IPv4 only. The hostname needs exactly one A record pointing at the address shown in the Dashboard, and no AAAA (IPv6) record. Let’s Encrypt prefers IPv6 whenever an AAAA exists, so a stray AAAA left behind by a previous host answers the certificate challenge instead of us — and the certificate never issues. Delete the AAAA record, then check the domain again. A Cloudflare-proxied (orange-cloud) domain is fine as-is.

SSL certificates are provisioned automatically once DNS propagation completes (usually 1–5 minutes after you update the A record).

ghayma domain list

List all domains configured for the current project.

ghayma domain list

Output:

🌐 Domains for my-project: https://my-project.ghayma.app https://my-app.com

When no custom domains are configured, prints No domains configured.

ghayma domain delete

Remove a custom domain.

ghayma domain delete my-app.com

By default, the command asks for confirmation before removing, because removal breaks DNS routing for the hostname:

⚠️ Remove 'my-app.com'? This breaks DNS routing for this hostname. (y/N):

The hostname matches in any letter case and with or without a trailing dot (My-App.com. removes my-app.com). A collaborator restricted to some sites can add and remove domains only on the sites they can write.

Pass --yes (or -y) to skip the prompt — handy for scripted workflows:

ghayma domain delete my-app.com --yes

After removal, redeploy to apply the change:

✅ Domain 'my-app.com' removed. Redeploy to apply changes.