- Docs
- Domains & SSL
- Domains & aliases
Domains & aliases
Primary domains, aliases and www redirects.
An app has one primary domain and any number of aliases. One certificate covers them all.
cipi domains # every domain of every app, in one table| Column | Shows |
|---|---|
| DOMAIN, APP, KIND | The name, its app, primary or alias |
| TYPE, PHP, DOCROOT, BRANCH | How the app is served and deployed |
| LAST DEPLOY | When the live release was published |
| SSL | ✓/✗ per name |
| suffix | ⏸ suspended for suspended apps |
To rename the primary domain: cipi app edit myapp --domain=new.example.com (Manage apps).
Aliases#
cipi alias add myapp www.myapp.com
cipi alias add myapp myapp.it
cipi alias add myapp '*.myapp.com' # wildcard: quote it
cipi alias list myapp
cipi alias remove myapp myapp.itThe vhost keeps serving HTTPS while you change aliases. alias add tells you whether the new name is already covered by the certificate or which command adds it (usually cipi ssl install myapp; for a wildcard --dns=cloudflare, see Wildcard domains).
www and apex#
Pick one canonical host and 301 the other to it. Search engines see one site, and the certificate covers both.
cipi www force-to-root myapp # www.myapp.com → myapp.com cipi www force-from-root myapp # myapp.com → www.myapp.com cipi www status myapp cipi www clear myapp
The missing counterpart is added as an alias automatically. ACME challenges stay reachable, so renewals keep working. In cipi.yml: app.www: to-root.
In the web panel#
Aliases, certificates and www/apex redirects, from the browser. The web panel is optional; everything here also works from the CLI.
Common problems#
| Problem | Fix |
|---|---|
| Alias added but the site shows another app | DNS points elsewhere, or the browser cached a redirect: check dig, try a private window |
| HTTPS warning on the new alias | Re-run cipi ssl install myapp so the certificate covers it |
| Wildcard alias doesn't get a certificate | Wildcards need DNS validation: wildcard domains |
Questions#
| Question | Answer |
|---|---|
| How many domains per app? | As many aliases as you like; one certificate covers up to 100 names. |
| www or not? | Pick one with cipi www; the other redirects to it. |
| Behind Cloudflare? | Read Cloudflare in front of Laravel. |