№ 02 Two ways to give a customer a name

Two ways to give a customer a name

Pick one, or offer both.

  • Shape 1

    A subdomain you hand out

    Each customer gets a name under your own domain, such as acme.yourapp.com. You own the domain. We add one wildcard record to your zone once, and every new customer name works.

  • Shape 2

    A domain your customer brings

    The customer points a name they own, such as app.acme.com, at your app. The customer owns the name. You must handle one record and one certificate for each customer.

  • Term

    What "tenant" means here

    A tenant is one customer account inside one running app. All tenants share the app. The host name in each request tells the app which tenant is asking.

№ 03 Where a request goes

Where a request goes, hop by hop

From the visitor’s browser to one tenant’s page.

  1. 1

    The customer's DNS answers

    A visitor types app.acme.com. The DNS records at the customer’s own provider say where that name points.

    The customer

  2. 2

    The name reaches our edge or your instance

    A static site answers at the edge network. A dedicated instance answers at its fixed address.

    We run it

  3. 3

    A certificate matches the name

    The server must hold a certificate for the exact name the visitor typed. Without one, the browser shows a warning.

    We run it

  4. 4

    Your app reads the host name

    The request carries the host name it was sent to. The app looks that name up in its own list of tenants.

    Your app

  5. 5

    Your app answers for that tenant only

    The app loads that tenant’s data and nothing else. An unknown host name gets a plain "not found" reply.

    Your app

№ 04 What runs it, by hosting shape

What runs each customer name, by hosting shape

The plan decides what a customer’s bare domain can do.

Static Starter ST-STARTER
The check that matches a URL to a rule runs at the edge. It doesn't run your code. Anything that computes an answer per request needs an instance behind it. A static site serves the same files to every name. It cannot show different content for each customer. Each extra name is a briefed change, not a free switch. A separate site costs $10/mo past the sites your plan covers.
Dedicated M DD-M
Every dedicated plan (DD-S, DD-M, DD-L) lists a static IP. That one fixed address is what a customer’s bare domain points at. Your app reads the host name and picks the tenant.
Custom CU-0
A larger design, such as one instance for each big customer, is a quote. Ask us when one instance is not enough.
№ 05 Certificates

A certificate for every name

A browser shows a warning for a name that has none.

  • A wildcard covers one level

    A certificate for *.yourapp.com covers acme.yourapp.com. It does not cover eu.acme.yourapp.com. A second level needs its own certificate.

  • A wildcard needs a DNS check

    The issuer asks you to prove you control the whole domain by adding a record to its DNS. We can do this because we run your zone. Domains

  • A customer name waits for the record

    We can issue a certificate for app.acme.com only after the customer’s record points at you. Until then, the name shows a warning.

  • The customer’s CAA record can block it

    Names which certificate authority is allowed to issue for your domain. If the customer has a CAA record that names another issuer, our request fails. The customer must change it. Domains

№ 06 The records your customer adds

The records your customer adds

The customer adds each one at their own DNS provider.

  • CNAME record

    A subdomain, such as app.acme.com

    Points at: A name we give you. It points the customer’s subdomain at your app. The customer adds it at their own DNS provider.

  • A record

    A bare domain, such as acme.com

    Points at: The fixed address of your instance. DNS does not allow a CNAME on a bare domain. The customer needs an A record that points at a fixed address. Only a dedicated plan has one.

  • TXT record

    An ownership check, if your app asks for one

    Points at: A value your app made up. Your app can ask the customer to add a TXT record first. That shows the customer controls the name. Then your app adds the tenant.

We cannot add these records for the customer. Your app shows the customer what to add.

№ 07 What stays your app’s job

What stays your app’s job

Hosting gets the request to your app. The app decides whose it is.

  • Look up the tenant by host name

    Keep a table from host name to tenant. Compare names in lower case. Never trust a name the customer typed into a form.

  • Reply to an unknown host name

    A name that is not in the table must get a plain "not found" reply. It must not fall through to another tenant’s pages.

  • Keep each tenant’s data apart

    Every query must name the tenant. One missing filter shows one customer’s rows to another. Your data

  • Scope the cookie

    A cookie set for .yourapp.com reaches every customer subdomain. Set it for the exact host name, or one tenant can read another’s session. Logins

  • A session held in memory does not survive a release

    A release signs every customer out when sessions live in memory. This is true on every customer name at once. Logins

  • Remove a name when a customer leaves

    Delete the tenant row. Ask us to remove the certificate for that name. Tell the customer to delete their record. A name left behind still points at your app.

№ 08 This site’s own names

This site’s own names

Two names, one certificate, no wildcard.

Host names this site answers to: customhosted.com, www.customhosted.com.

  • Two names, one certificate

    This site answers to customhosted.com and www.customhosted.com. One certificate covers both names.

  • No wildcard

    Neither name uses a wildcard. This site has no customer subdomains, so it has no use for one.

  • One host is canonical

    The www name sends a redirect to the bare host. It keeps the path and the query string. Delivery

  • A build check guards the list

    The build reads the infrastructure file. It fails if the names printed here differ from the names the site answers to, or if any name holds a wildcard.

№ 09 The CodeHerder line

Brief the “add your domain” screen

You brief it. An agent writes it. A person reviews it before it ships.

Your customers need a screen where they type their domain and see the record to add. Brief that screen, and it opens as a pull request. The Agentic iteration — CodeHerder add-on ($25/mo) covers it.

  1. 1

    You brief the "add your domain" screen

    Say what a customer types, what record it must see, and what the screen shows while it waits for the record.

    You

  2. 2

    It is triaged as a change to your app

    A new screen and a new table are a briefed change. A new tenant system from scratch is a rebuild, and that belongs with CustomLabs.

    CustomHosted

  3. 3

    Briefed as a change

    Written up the same way any other change request is. The iteration add-on is what covers it.

    CustomLabs

  4. 4

    An agent opens the pull request

    The change lands as a real pull request against the repository, with the test suite run against it. The tests send a request with a known host name and with an unknown one.

    CodeHerder

  5. 5

    A human reviews and merges

    Someone reads the diff before it goes anywhere near production — nothing here is auto-applied blind.

    CustomLabs

  6. 6

    It ships through the same pipeline

    The same pipeline that deploys everything else on your stack ships this too — no separate process to babysit.

    CustomHosted

  7. 7

    You're told it's done

    A note confirming what changed and that it merged, in the same shape as every other note on this site.

    CustomHosted

A tenant system from scratch is a different job. CustomLabs builds it, and we host it. A failure follows the Monitoring ladder, like any other failure.

№ 10 What it costs

What a multi-tenant app costs

Flat monthly rates. Each price comes from the rate card.

  • A multi-tenant app

    $71/mo

    One dedicated instance and one database tier. The instance has a fixed address for customer bare domains.

    Dedicated M + DB Starter

    Quote this shape
  • The same, with changes briefed

    $96/mo

    The same shape, plus the Agentic iteration — CodeHerder add-on for the "add your domain" screen and later changes.

    Dedicated M + Iteration — CodeHerder loop + DB Starter

    Quote this shape
  • No fee for each customer name

    The rate card has no line for a customer name on a dedicated plan. $10/mo for an extra static site is a different thing: it adds a site, not a name. Pricing

  • The tenant system is a separate job

    CustomLabs quotes the tenant system itself. We host it and ship each change you brief.

№ 11 The honest limits

Said plainly

Every limit here is one we hold to.

  • We cannot change a customer’s DNS

    The customer’s records sit at the customer’s provider. We can tell the customer what to add. We cannot add it, and we cannot make a customer do it.

  • We do not keep tenants’ data apart for you

    The database sees one app. It does not know your tenants exist. Your app must filter every query by tenant. CustomLabs can build that in.

  • A wildcard covers one level only

    A wildcard name matches one label. A name with two labels before your domain needs its own certificate.

  • No per-request compute beyond resolving the address

    The check that matches a URL to a rule runs at the edge. It doesn't run your code. Anything that computes an answer per request needs an instance behind it. Delivery

№ 12 Answers

Customer domains, answered

The questions people ask before they build a multi-tenant app.

  1. 01Can each of my customers use their own domain?

    Yes, on a dedicated plan. The customer adds a record at their own DNS provider. Your app reads the host name and finds the tenant. We issue the certificate after the record points at you.

  2. 02Can a static site serve a different site for each customer?

    No. A static site serves the same files to every name. Content for each customer needs a server.

  3. 03Why does my customer’s bare domain need an A record?

    DNS does not allow a CNAME on a bare domain. The A record needs a fixed address. Every dedicated plan has one.

  4. 04Do I need a wildcard certificate?

    Only if you hand out subdomains under your own domain. A wildcard covers one level. A customer’s own domain gets its own certificate.

  5. 05Who adds the record for my customer?

    The customer does. We cannot edit DNS that we do not run. Your app can show the customer the exact record to add.

  6. 06What does a customer name cost?

    The rate card has no per-name fee on a dedicated plan. The price is the plan, the database tier, and any add-on you choose.

Building an app with a customer on every name?

Tell us how customers will reach it. A change to the app is a brief, and the Agentic iteration — CodeHerder add-on ($25/mo) covers it.

Get a quote →