Custom domains

Serve an app on a domain you own.

Add a domain

$ shim domain add budget.example.com

The command prints two DNS records. Add both where you manage DNS for the domain:

TypeNameValue
CNAMEbudget.example.comthe address the command prints
TXT_shim-challenge.budget.example.comshim-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 add

The 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.live address 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 CNAME record on a bare domain such as example.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.com

The 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.