Help centerSecurity & access
Access control
Per-domain maintenance page with a preview link, password-protected site and redirects by country or language.
The Access tab of each domain decides who gets in and where each visitor lands: close the site behind a branded maintenance page, let in only people who have the password, or send visitors from another country to the right version. Everything applies to that domain only, without touching the origin app, and goes live within seconds.
Where to find it
- Open the project and click the domain.
- Go to the Access tab.
- The screen has three cards: Maintenance page, Password-protected site and Redirect by country or language. Each one has its own Save button.
Tenanci always applies the rules in the same order: maintenance first, then password, then redirects. While maintenance is on, nobody reaches the password screen.
Maintenance page
Closes the site with a simple page using the domain's icon and color while you work on the app or migrate data.
Google sees it as temporary: the page answers 503 with a Retry-After header, so the site keeps its search
rankings.
- In the Maintenance page card, turn on Site under maintenance.
- Fill in Title (e.g. "We'll be right back") and Message.
- Optional: under Expected return (optional), set a date and time. It tells search engines when to come back.
- Optional: under IPs that still see the site (one per line), add your office or team IP. Single IPs and
ranges (
200.150.10.0/24) are accepted, up to 50. - Click Save.
Preview link
After saving, you get a Preview link (opens the site normally for 7 days). Whoever opens it sees the real site, even with maintenance on, for 7 days in that browser. It's how a client approves the new version before you open it to everyone, without having to find out their IP.
Sent the link to the wrong person? Click Generate another link: the previous one stops working immediately.
Password-protected site
Only people who know the password get in. Use it for staging, client previews or a launch that can't leak yet. Visitors see a screen with the domain's icon and a password field; once they get it right, they keep browsing for 7 days in that browser.
- In the Password-protected site card, turn on Require password.
- Under Password, type the password (at least 6 characters).
- Optional: under Message on the password screen, write something like "Exclusive preview for the client".
- Click Save.
To change the password later, type the new one under New password (leave empty to keep it) and save. Anyone who signed in with the old password has to type the new one.
Redirect by country or language
Sends visitors to the right version of the site as they arrive: people from the US or with an English browser go to
/en, people from Portugal go to the European site. Search engines are never redirected, so every version keeps
getting indexed normally.
- In the Redirect by country or language card, click Add rule.
- Under When entering, set the entry path:
/(home page only) or a prefix like/store/*. - Fill in Countries (codes, e.g. US, GB) and/or Languages (e.g. en, es). Matching either one is enough.
- Under Go to, enter a path on the same site (
/en) or a full address (https://...). - Keep First visit only (visitors can switch later) checked so nobody gets stuck in one version.
- Click Save. You can have up to 50 rules; the first one that matches wins.
How a rule is evaluated:
| Item | How it works |
|---|---|
| Country | detected from the visitor's IP, as a 2-letter code (BR, US, PT) |
| Language | only the browser's preferred language counts; en matches en-US and en-GB, pt-BR requires exactly pt-BR |
| When | only when a page is opened (never images, scripts or API calls) |
| Address | URL parameters (?utm_source=...) are carried over to the destination |
| First visit | a visitor who was redirected once is not redirected again |
Through the API
Everything the Access tab does is available through GET /domains/:id/access
and PUT /domains/:id/access (domains:write scope). Send only the part you want to
change: anything missing from the body stays as it is. redirects replaces the whole list.
curl -X PUT https://api.tenanci.com/v2/domains/dom_4h7n1q/access \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"maintenance": { "enabled": true, "title": "Back soon", "message": "Update in progress.", "until": "2026-11-15T15:00:00Z" },
"password": { "enabled": true, "password": "preview-2026", "message": "Client preview" },
"redirects": [{ "from": "/", "countries": ["US", "GB"], "languages": ["en"], "to": "/en", "once": true }]
}'
# → { "maintenance": { ..., "previewUrl": "https://<domain>/?tnc_preview=..." }, "password": { "enabled": true, "isSet": true, ... }, "redirects": [ ... ] }const access = await tenanci.domains.setAccess("dom_4h7n1q", {
maintenance: { enabled: true, title: "Back soon", message: "Update in progress." },
});
console.log(access.maintenance.previewUrl); // send it to whoever needs to see the site
// replace the preview link; turn it off later
await tenanci.domains.setAccess("dom_4h7n1q", { maintenance: { enabled: true, newPreviewLink: true } });
await tenanci.domains.setAccess("dom_4h7n1q", { maintenance: { enabled: false } });Troubleshooting
- I allowed my IP and still see the maintenance page. Check the public IP of whoever is visiting (mobile networks and VPNs change it). The preview link works without depending on IPs.
- The redirect doesn't happen for me. If you were already redirected once with First visit only, it won't happen again in that browser; test in a private window. Remember that only the browser's first language counts.
- Visitors on
/en/pricingget sent back to/en. With When entering set to/*, every page matches, including the destination version's pages. Use/(home page only) or a more specific prefix. - "Set the password before turning it on" error. The first time you turn on Require password, the password has to be sent along.

