Domains
Where an App lives: its address on basemodo.app and what it shares with other Apps there, your own domain with HTTPS, and what happens to links when you rename it.
Its address
Every App answers at https://<name>.basemodo.app, its name followed by a short suffix only when another App already had that name, or the name is www. The address is on its own domain, apart from basemodo.com, so nothing an App does can touch your Basemodo account. Other Apps share basemodo.app with yours, though: see Apps share one site.
Apps share one site
A browser tells sites apart by the Public Suffix List, and basemodo.app is not on it yet, so a browser takes every App on basemodo.app for one site. Basemodo keeps Apps apart where it can, and the rest is up to you:
- Requests from another App arrive signed out. A form another App posts to yours, a
fetchor an image it sends, or a frame it puts your App in reaches your App without the visitor's cookies or identity headers: a Private App answers with its sign-in page, a Public one sees an anonymous visitor. So your App, framed by another App, shows signed out. A link followed from another App keeps both, as does every request your App's own pages send. The same holds between the subdomains of a custom domain: a form onwww.example.composted toapp.example.comarrives signed out. - Your cookies are your App's own. Basemodo drops the
Domainattribute of every cookie your App sets on basemodo.app, so none reaches other Apps. It cannot see a cookie your pages' scripts set (document.cookie): set those withoutDomaintoo. Name your cookies with the__Host-prefix (__Host-cart=3; Path=/; Secure), which no other App can set or replace. On a custom domain, Basemodo leavesDomainas your App sets it. - Your own sign-in goes on a custom domain. A browser's password manager offers a password saved on one App on every other App, and a passkey made for
basemodo.appworks on all of them. If your App signs people in itself, with passwords or passkeys, give it a custom domain and have people sign in there. A passkey'srpIdis your App's own host (app.example.com), neverbasemodo.app. - Keep your cookies small. A browser holds a limited number of cookies for all of basemodo.app together, and your App receives at most 8 KB of a visitor's cookies with each request. When there are more, Basemodo drops cookies whose name does not start with
__Host-first, the largest first, and only then__Host-ones: other Apps can set cookies for yours, but never a__Host-one, so name the cookies your App needs (its session)__Host-.
Renaming an App
basemodo rename gives an App a new name, and its address follows:
basemodo rename team-lunch --app lunch-rotaThe old address keeps working for 30 days: every request to it is sent to the new one, path and all, so links people already have still land. Meanwhile no other App can take the old address. Its custom domains do not change. From then on, deploy it with basemodo deploy --name team-lunch (or from a folder of that name). Only the App's Owner renames it.
Custom domains
On every Plan an App can also answer at a hostname of yours, like app.example.com, with HTTPS that Basemodo sets up and renews: a Plan has two for each App it allows.
- Add it:
basemodo domains add app.example.com. It prints two DNS records. - Add both at your domain's DNS host:
- a
CNAMErecord atapp.example.compointing todomains.basemodo.app, which sends visitors to Basemodo; - a
TXTrecord at_basemodo-challenge.app.example.comwith the value it printed, which proves the domain is yours (the CNAME alone does not: anyone could have left one pointing at Basemodo).
- a
- Verify:
basemodo domains verify app.example.com. DNS changes can take a few minutes to show; the errordomain_not_verifiedsays which record is still missing. Basemodo also looks by itself every few minutes for a week.
Once verified, the App answers at the hostname at once, with the same Visibility and sign-in as at its basemodo.app address, and the same rules for search engines. Basemodo then gets a certificate from Let's Encrypt (a minute or so): basemodo domains list shows each domain as pending (records not found yet), issuing, active (served over HTTPS) or failed (with the reason, for example a CAA record that does not allow Let's Encrypt). A refused certificate is tried again an hour later, then less and less often, down to once a day; basemodo domains list says when. Certificates are renewed well before they expire. Keep both records: Basemodo looks for them again before it tries a refused certificate again and before each renewal, and when either is gone it stops answering at the hostname, so that whoever holds the domain then can claim it. basemodo domains list then shows it pending with the reason; add the records back and verify it again.
Every Owner's certificates come from one Let's Encrypt account, which takes only so many new orders in 3 hours from everyone together. So that no one can use them up for everyone else, Basemodo orders at most 10 certificates an hour and 30 a day for one Owner's custom domains (yours, or a Workspace's). Each certificate for a domain that has none yet counts, a refused one tried again included; renewals do not, and removing a domain gives none back. Past either, a newly verified domain answers over HTTP while its certificate waits: basemodo domains list shows it issuing, says which budget is spent and until when, and Basemodo orders it then. A domain's first certificate goes before a refused one tried again.
The CNAME cannot sit at the apex of a domain (example.com itself), so use a subdomain such as www or app. A hostname belongs to one App: the first to verify it holds it, and domain_taken tells anyone else. basemodo domains remove frees it; deleting the App does too.