Custom Domains
A space is served at <space>.yaks.app and each of its apps at <space>.yaks.app/<app>/. Either can also be served at a domain the person already owns, such as example.com or www.example.com, and the .yaks.app address keeps working.
A domain can be attached in two ways, depending on what you name:
- The space.
ourbookclub.comserves the space exactly asyourname.yaks.appdoes: the front page at/, every app at/<app>/. Each app is a path under the domain. - One app.
example.comserves that app at its root, and nothing else.
Either way the domain also takes mail (see "Mail at the domain" below).
A space can have both at once, and an app in it can still have a domain of its own: at the app's domain the app is served at the root, and at the space's domain it is served at /<app>/.
A domain is attached to the space or the app itself, never to the .yaks.app address it currently has. So when space_set(slug) or app_set(app, slug) moves the .yaks.app address, the domain keeps serving exactly what it served before, with nothing to re-attach and no DNS to change (Front Page and Routing).
This page is written for you, the assistant. The person you are helping owns a domain and probably bought it years ago from GoDaddy, Namecheap or Squarespace. They do not know what a CNAME is, and they should not need to. You already know what those registrars' control panels look like. Attach the domain with domain_attach, then guide them through their registrar's DNS settings in plain language, or make the changes yourself if you have access to them.
Back to the map: The guide
Plan requirement
Custom domains require the Plus plan (or a space that is explicitly exempt). If the space is not eligible, domain_attach returns a message carrying the space's plan-settings link, and provisions no hostname. Give the person that link to compare paid plans; never link directly to checkout. The link is their space's https://yaks.app/manage/<space>/billing page. If they need to sign in, the normal sign-in flow returns them to that page. The sign-in email already offers a single-use link; do not create or expose a login token in the conversation.
Wait for the plan change before continuing with DNS setup. Keep using the existing .yaks.app address in the meantime.
Buying a domain
In your space’s settings, open Domains and search for a name or a few words. Results show availability, the price for the first year, and the registrar’s yearly renewal price. An agent can search with domain_search(query) and send you to the same Domains page.
You pay Cloudflare’s price for the first year with no markup. The Pro plan and the Plus plan billed yearly cover up to $12 per year toward one domain renewal. Your first purchase is the default. To change it, choose Make included domain beside another domain in the space. You pay any remainder and the registrar’s full price for other domains.
When payment is due, open Domains to review the price and pay before the registration expires. A domain you bought through yaks.app can renew even after the space moves to the free plan.
The domain belongs to your space. When it appears in Your domains, choose an app and save to attach it. You can choose another app or Unattached at any time. yaks.app sets up DNS and the certificate for you.
To transfer a domain, open Transfer beside it and enter the receiving space's address. An owner of that space can accept the offer in Updates. Acceptance moves ownership and renewal to the receiving space. The domain arrives unattached, and its renewal then follows the receiving space's plan.
A paid order that cannot be registered is refunded in full.
Tools: domain_attach, domain_status, domain_detach
domain_attach(app?, hostname, to?)— provisions the hostname, sets up its mail domain, and returns every record to add in one list: the CNAME and ownership TXT record for the web, then the mail records, each with its full name and exact value, and an MX record's priority. Withapp, the domain is attached to that app; without it, to the space. Withto, another domain already attached to the same place, this one sends every visitor there instead of serving the place itself. Attaching an attached domain again setsto, finishes its mail if that could not be set up before, and restores an attachment from the trash. Only the space owner may attach a domain.domain_status(hostname?)— reports what each domain points at, how far provisioning has progressed, as the four steps that can be outstanding (described below), and which of its mail records have arrived. Omithostnameto list every domain in the space.domain_detach(hostname)— moves the attachment to the trash. The shared hostname, certificate and mail domain stay held. The app keeps its data, files and<space>.yaks.appaddress.domain_attachrestores the attachment.domain_detach(hostname, purge: true)asks the owner to release it for good through the confirmation page.
A domain points at one space or app, and a hostname can be attached to only one place on the whole platform. www.example.com and example.com are two hostnames, so attach both if the person wants both. To have the site answer at one of them, attach the other with to: domain_attach(app, hostname: 'example.com', to: 'www.example.com') sends every visitor to the bare domain on to https://www.example.com, path and query kept, with a permanent redirect. Detaching www.example.com makes example.com serve the place again.
DNS records: CNAME and ownership TXT
The CNAME directs traffic to yaks.app:
CNAME example.com → origin.saas.yaks.appThe ownership TXT record proves control of this hostname's DNS. Its name is _cf-custom-hostname.<hostname> and its value is a token unique to this attachment. Copy the exact name and value from domain_attach or domain_status; a token from an earlier attachment does not verify this one.
Add both records where the domain's DNS is managed. For www.example.com, a panel that appends example.com needs www for the CNAME and _cf-custom-hostname.www for the TXT record. The TXT record's name is separate from the CNAME's, so they can coexist.
The domain serves the space or app only after the TXT record is verified, Cloudflare accepts the hostname, and its certificate is ready. A CNAME already pointing here proves where traffic goes, not who owns the hostname. Existing active hostnames keep serving. After ownership is verified, the TXT record can be removed; keep the CNAME for as long as the domain should serve here.
Mail at the domain
An attached domain takes mail for the place it serves, so a township can have clerk@example.org. Where the mail goes depends on what the domain already has:
- An apex that takes no mail (no MX record at
example.org): mail is at the domain itself,clerk@example.org. - A domain that already takes mail: mail is at
mail.example.org, so the mailboxes they already have keep working and nothing is forwarded. Their existing MX record stays as it is; never tell them to change or delete it. - A name below the apex (
www.example.org): mail is atmail.www.example.org, because the CNAME there is the only record DNS allows at that name. For mail at the bare domain, also attachexample.org(withto: 'www.example.org'to send its visitors to www).
At a space's domain, an app's name is that app's address (recipes@example.org) and any other name (clerk@, treasurer@) is the space's own mailbox, which reaches the space as <space>@yaks.app does. At an app's domain every address is the app's. domain_attach and domain_status both say which addresses the place has.
The mail records are five, at the mail domain: a DKIM TXT record at resend._domainkey, an MX and an SPF TXT record at send, a CNAME at rsend, and the MX that receives mail at the mail domain itself. Add them with the web records, copying each name, value and MX priority exactly. They take no part in serving the web; mail starts once all of them have arrived, which domain_status reads from the mail provider. If the mail domain could not be set up when the domain was attached, both tools say why, and attaching the domain again finishes it.
Adding the records at each registrar
The mistake people make at half of these registrars: the Name/Host field is a prefix, and the panel appends the domain itself. Typing www.example.com there produces www.example.com.example.com. When in doubt, type www, and check the record's full name after saving.
GoDaddy — Domain Portfolio → the domain → DNS → Add New Record. Fields are Type, Name, Value, TTL. Name is the prefix (www), not the whole hostname. GoDaddy has no apex option at all: see "Apex domains" below.
Namecheap — Domain List → Manage → Advanced DNS → Host Records → Add New Record. Fields are Type, Host, Value, TTL. Host is a prefix and Namecheap appends the domain, so www, never www.example.com. Namecheap refuses a CNAME at @; it offers a URL Redirect record instead, which is the www approach below.
Squarespace (Google Domains was migrated to Squarespace; the migration is complete, and the panel is Squarespace's) — account.squarespace.com/domains → the domain → DNS → Custom Records → Add Record. Fields are Type, Name, Priority, TTL, Data; the target goes in Data. Name is a prefix and Squarespace appends the domain. Squarespace has no apex record at all.
Wix — Domains → the domain's Domain Actions → Manage DNS records. Wix's own instruction: where another vendor tells you to put @ in Host Name, leave Host Name blank instead.
Hover — the domain's Overview → DNS → Add a record. Fields are Type, Hostname, Target Name. Hover states that it cannot hold a CNAME on the root domain. It also only manages DNS while the domain still uses Hover's nameservers.
Shopify — admin → Settings → Domains → the domain → DNS settings → Manage → Add custom record. Host is www. No apex option for an outside target.
Porkbun — Domain Management → DNS → Add Record. Fields are Type, Host, Answer, TTL. Porkbun is the only consumer registrar in this list with a working apex option: pick the record type ALIAS – CNAME flattening, leave Host blank, and put origin.saas.yaks.app in Answer.
Cloudflare — the zone → DNS → Add record. Type CNAME, Name www or @, Target origin.saas.yaks.app. Set Proxy status to DNS only (the grey cloud). When the record is proxied, Cloudflare answers with its own addresses in the person's zone and the request never reaches yaks.app.
Apex domains
DNS does not allow a CNAME at a domain's apex: the bare example.com, with no subdomain in front of it. Non-technical people often give up at this step, so have the answer ready before they reach it. There are three ways to serve an apex domain:
Move their DNS to Cloudflare. This is the best option; recommend it first. Cloudflare's DNS flattens a CNAME at the apex (it resolves the target and serves its addresses), so example.com works. It is free, it does not transfer the domain's registration, and it takes about ten minutes:
- dash.cloudflare.com → Add a domain → type
example.com. - Choose the Free plan. Cloudflare scans the existing records; check that their mail records were copied before continuing, because a missing MX record is the usual way this step goes wrong.
- Cloudflare gives two nameservers. Copy both.
- At the registrar, replace the current nameservers with those two. Every panel above has this under a "Nameservers" or "DNS" heading.
- Wait. Usually an hour or two, sometimes a day.
- Then add the CNAME in Cloudflare's own DNS tab, as above.
If the domain has DNSSEC turned on at the old registrar, turn it off there first and wait a day before changing nameservers; otherwise resolvers see a broken DNSSEC chain and the domain stops resolving. Cloudflare can turn DNSSEC back on afterwards.
Use the registrar's ALIAS or ANAME record. It takes the same value as the CNAME, in a record type that is allowed at the apex. Porkbun has one. GoDaddy, Namecheap, Squarespace, Hover and Shopify do not.
Attach www instead. domain_attach(app, hostname: 'www.example.com'), a CNAME at www, and a forwarding rule at the apex sending example.com to www.example.com. Every registrar above offers domain forwarding under some name. It works and people accept it, but the address they share is still the bare domain, so offer Cloudflare first.
While they are moving DNS, tell them that Cloudflare's registrar charges what the registry charges, with no markup, so transferring the domain there at its next renewal usually costs less than they pay now. A transfer requires the domain to be at least 60 days old, unlocked at the current registrar, and an authorization code from that registrar, and it takes about five days. None of that is required to point the domain at yaks.app; people usually ask about it once their DNS is on Cloudflare.
Provisioning status
domain_status reports four steps, each done, waiting or error, because each step waits on a different party:
- ownership — whether the ownership TXT record matches this attachment. Waiting means the person must add the exact TXT name and value the tool gives.
- dns — whether the CNAME resolves to yaks.app. Waiting means the person has not added it yet, or it has not propagated. The ownership TXT record and CNAME are the two records the person adds.
- validation — whether Cloudflare has accepted the hostname as one yaks.app may serve. It completes after dns.
- certificate — whether the HTTPS certificate is issued. This step can still be running after the records have propagated, and it needs no action from anybody.
So "your CNAME hasn't propagated yet" and "the certificate is still issuing" are different answers, and the tool reports which one applies. Tell the person the one it reports. A step in error carries the reason as Cloudflare gave it, in Cloudflare's words, not a paraphrase.
Timing: DNS propagation usually takes minutes and can take a day, depending on the old record's TTL. The certificate is usually issued a few minutes after that. Nothing needs to be done in between; check again in five minutes rather than changing anything.
Troubleshooting a domain that stays pending
- A CAA record on their domain. A CAA record lists which certificate authorities may issue certificates for the domain, and the one yaks.app uses has to be on the list. The certificate step reports this.
- Another record at the same name. DNS forbids a CNAME beside an A, AAAA or another CNAME at one name. An old A record at
wwwpointing at a site they replaced years ago has to be deleted, not left alongside. - The domain is in somebody else's Cloudflare account, on hold. The error says so. Only that account's owner can remove the hold.
- An old custom hostname from a previous platform. If they moved from another site builder, the hostname may still be registered there, and that registration keeps taking precedence. They have to remove it at the old platform.
- The record was saved with the domain doubled:
www.example.com.example.com. See "Adding the records at each registrar" above. This is by far the most common cause.
Detaching a domain
domain_detach(hostname) puts the attachment in the trash and stops serving its app or space there. The hostname, certificate and mail domain remain held until the owner chooses to purge it. Keep its DNS records if it may be restored: domain_attach with the same hostname restores the attachment.
To release the shared name permanently, call domain_detach with purge: true for an attachment already in the trash. It emails the owner a confirmation page. Only their confirmation releases the hostname and removes its mail domain. After that, remove its CNAME, ownership TXT and mail records wherever its DNS is managed. The app and its data remain at <space>.yaks.app.
