Custom domains
Serve an app on a domain you own.
Add a domain
$ shim domain add budget.example.comThe command prints two DNS records. Add both where you manage DNS for the domain:
| Type | Name | Value |
|---|---|---|
CNAME | budget.example.com | the address the command prints |
TXT | _shim-challenge.budget.example.com | shim-verify= followed by a code |
The TXT record proves the domain is yours; the CNAME record sends its visitors to Shim. The domain becomes active on its own once both are in place, often within minutes and sometimes after an hour. You can press Ctrl-C while the command waits. The HTTPS certificate is issued automatically.
$ shim domain list # status, and the records still to addThe Custom domains section on the Settings tab of the app in the dashboard shows the same records with a copy button, and the domains key in shim.toml adds domains on deploy.
How the app behaves on it
- The app keeps its
shim.liveaddress as well. - A private app stays private on its own domain: visitors sign in the same way.
Rules
- Write the name in lowercase, for example
budget.example.com. - A domain can be connected to one app at a time.
- Many DNS providers do not allow a
CNAMErecord on a bare domain such asexample.com. Use a subdomain, or a provider that offers a flattened or alias record at the root. - The number of domains for each app depends on the plan: 1 on Free, 10 on Pro.
Remove a domain
$ shim domain remove budget.example.comThe command asks you to type the domain. The app stops answering on it, and you can then delete the two DNS records.
If setting a domain up fails, remove it and add it again.