Skip to content

Type a word or two, like firewall or rollback.

Open Coresmith
Browse the docs
Apps Checked against Coresmith 0.8.46.

Add a domain

Open as Markdown

An app can answer on any number of domains: one primary domain, and as many more as you add. Coresmith gets each domain's HTTPS certificate itself as soon as the domain points at the server. There's nothing to open or press, and the certificate renews itself.

With a default domain, every app also answers at its name under that domain without adding anything.

Add a domain

  1. On the app's page, choose Add domain. With a default domain, the box opens on the app's address under it, so choose Use your own domain instead.
  2. Enter the name, such as app.example.com. Coresmith shows the DNS records that point it at the server, each with a copy button: an A record for the server's IPv4 address, and an AAAA record for each of its IPv6 addresses. When the server takes visitors through Cloudflare, it shows one CNAME record for the tunnel instead, and adds it for you when its Cloudflare token covers the domain. When they come through another server, it shows that server's addresses.
  3. Add those records at your DNS provider.
  4. Choose Add domain.

If you add the records after the domain, Coresmith notices within a few minutes and gets the certificate then. Until it does, the domain's badge reads Waiting for DNS, then Getting certificate, then TLS. To check sooner, choose Check again on the domains card.

If you add a domain to an app whose only domain is its default address, the new domain becomes primary.

A domain belongs to one app. If another app on the same server or in your team already uses it, remove it from that app first.

Remove a domain

On the domains card, choose the remove button beside the domain, then Remove. If it was the primary domain, the next one becomes primary. Removing the last domain takes the app off the web until you add another. Coresmith leaves the DNS records of a domain you added where you made them, and removes the records it made for a default address.

Open the app

Once a release is live, choose Visit at the top of the app's page. The primary domain opens in a new tab.

The www name

When you add a bare domain such as example.com, Coresmith also answers on www.example.com and sends its visitors to the same page on example.com. Add www.example.com instead and it works the other way round. There's nothing to set up beyond DNS.

Point the www name at the server with the same records. Until it points there, the domains card lists it as redirect with no certificate, and the note under the card shows the record to add. Once the record is in, Coresmith gets its certificate on its own.

Coresmith doesn't add the other name when:

  • the domain is a subdomain, such as app.example.com;
  • you've added both names yourself, which serves the app on both without a redirect;
  • another app on the same server or in your team already uses that name;
  • a wildcard domain such as *.example.com already covers it.

Check that visitors can reach it

Coresmith checks each domain from outside your network, over IPv4 and IPv6. It checks when you add a domain to a live app, after deploys until the domain is reachable, as soon as a domain that was waiting for its DNS points at the server, and whenever you choose Check again on the domains card.

When a domain can't be reached, a note under the domains card says why and what to change, with any record it needs ready to copy. For example:

  • a record points somewhere else;
  • a home router isn't forwarding ports 80 and 443;
  • a home internet provider shares one IPv4 address between customers, so the way in is a Cloudflare Tunnel or IPv6;
  • a router blocks incoming IPv6.

The check is advice. Coresmith adds the domain whatever it finds.

Domains with only IPv6

A domain with an AAAA record and no A record works for visitors who have IPv6, but networks without IPv6 can't open it. Coresmith says so.

If the internet can't reach the server's IPv4 address, turn on IPv4 through Cloudflare on the server's page. Coresmith points the domain at a Cloudflare Tunnel, and visitors reach it over IPv4 and IPv6 with no ports to open. Keeping the AAAA record and turning on Cloudflare's proxy for the domain works too. Either way, the domain's DNS has to be on Cloudflare. If another of your servers is reachable over IPv4, IPv4 through another server works with DNS hosted anywhere. If the IPv4 address is yours and you can forward ports 80 and 443 to the server, an A record works as well.

Behind Cloudflare's proxy

Coresmith recognizes domains that point at Cloudflare's proxy. It can't test those from outside, since Cloudflare answers in place of your server. In Cloudflare, point the domain at the server and set SSL/TLS to Full (strict).

Domains that come through the server's Cloudflare Tunnel are the exception. Coresmith set up that path itself, so it marks them as reachable.

Without a domain

A default domain gives every app an HTTPS address of its own. Without one, two switches on the app's page give the app an address before it has a domain:

  • Preview without a domain serves the app over plain HTTP on a port of the server's own address, shown on the app's page. Anyone with that address can open it.
  • Reachable on your tailnet serves the app on the server's Tailscale address. Open a port covers letting your tailnet in.

Neither has HTTPS. Add a domain for that.

Requests for other names

A server answers only for domains you've added and the www names Coresmith adds beside them. Requests for any other name get no answer.