Help centerGet started
How it works
The path of a visit through Tenanci, domain rewriting in HTML, headers and cookies, certificates, caching and what your origin receives.
Tenanci sits between the visitor and your app, as a reverse proxy. The customer's domain DNS points to Tenanci's edge network; the edge fetches the page from your app and returns it to the visitor with the address swapped. To the visitor, it's the customer's site. To your app, it's a regular visit.
The path of a visit
- The visitor opens
https://booking.joesbarbershop.com. DNS (the CNAME or A record you created) leads to Tenanci's edge. - The edge presents the domain's HTTPS certificate, issued automatically. Anyone arriving over
http://is redirected tohttps://. - Before going further, the edge applies the domain's rules: TenantGuard, access (maintenance, password), blocked paths and routes.
- The edge requests the page from the project's origin (
https://app.agendafacil.com), with the requested path and query. - The response comes back with the origin's domain swapped for the customer's and your customizations applied, and goes to the visitor.
The origin's status code is always preserved (a 404 stays a 404), and WebSocket and Server-Sent Events go straight through, with no buffering.
Domain rewriting
Everything the origin returns with its own address now shows the customer's address:
- HTML, JS, CSS, JSON and XML: links,
src,url(), full URLs and protocol-relative//host. Images, fonts, videos,.wasmand other binaries pass through untouched, byte for byte; - redirects: a
Location: https://app.agendafacil.com/loginbecomeshttps://booking.joesbarbershop.com/login; - headers that carry URLs, such as
Link,Content-Location,Access-Control-Allow-OriginandContent-Security-Policy; - cookies: if the origin sets
Domain=app.agendafacil.com, the cookie now applies to the customer's domain. Cookies withoutDomainstay host-only,__Host-cookies are never touched, and cookies for other (third-party) domains are left as they are.
It also works the other way: in headers the browser sends (like Origin and Referer) and in the query string,
the customer's domain is turned back into the origin's. That's what makes login, CSRF and CORS work just like on
the original address.
If your app loads files from other hosts of yours (CDN, API, storage), add them under
Extra origins: they're then served at
https://<customer domain>/__external__/<host>, without exposing the original address.
What your origin receives
| Header | Value |
|---|---|
Host |
the origin host (app.agendafacil.com), just like a direct visit |
X-Forwarded-Host |
the customer's domain (booking.joesbarbershop.com) |
X-Forwarded-Proto |
https |
X-Forwarded-For and X-Real-Ip |
the visitor's IP |
X-Tenanci-Tenant |
who the end customer is, signed (only if you set up tenant context) |
The visitor's cookies and Authorization go to your origin, but never to external hosts served through
/__external__. Any X-Tenanci-* headers coming from the browser are dropped: only the edge can send them.
HTTPS certificates
As soon as the domain's DNS points to Tenanci, the certificate is issued automatically (usually within 1 to 2 minutes) and renewed before it expires, without the domain going offline. You don't upload files or keys. Details such as HTTP-01/DNS-01 and CAA records are in HTTPS certificates.
Caching and performance
- Static files straight from the origin (on by default): JS, CSS, fonts and images that don't change and don't need domain rewriting are downloaded by the browser directly from your server, which saves traffic. The original address shows up in the requests for those files; you can turn it off per domain.
- JS and CSS files that do go through Tenanci are kept on the edge, already compressed.
- HTML cache (off by default): for sites where the page is the same for everyone, the edge keeps the HTML for 1 minute, 5 minutes or 1 hour and answers instantly.
Both settings live in the Performance card on the domain's Settings tab. See when to use them in Performance and caching.
Changes live in seconds
There's no "publish" button for domain and project settings: when you save a route, a header or a setting, the new version reaches the edge within a few seconds. (TailorKit is the exception: there you work on a draft and publish when you're ready; see Publishing.)
Security
- Proof of ownership: white-label is only served for origins proven, through a TXT record, to be yours. That stops anyone from using Tenanci to clone someone else's site.
- One domain, one account: the same domain can't be in two accounts. Nobody can "hijack" a domain that already points to Tenanci.
- A disabled domain answers with a service-unavailable page (HTTP 503); a domain that isn't registered answers "domain not configured" (HTTP 404).
- TenantGuard protects every domain against common attacks and bots.

