DhokoAuthaz
DocumentationAPI Reference
  • Get Started

    • Authaz
    • Core Concepts
    • Set up your app
    • Quickstart — cURL
  • Authentication

    • Authentication Settings
    • Signup
    • Invitations
    • Password Authentication
    • Multi-Factor Auth
    • Magic Link
    • OAuth / Social Login
    • Passkey (WebAuthn)
    • SAML SSO
    • Machine-to-Machine (M2M)
    • API Keys
  • Authorization

    • Authorization
    • Resources
    • Policies
    • Roles
    • Access Explorer
  • Tenancy

    • Multi-tenancy
    • Tenancy Customization
  • Brand & Host

    • Branding
    • Custom Domains
    • Communications & Email Templates
  • Operate

    • Users
    • Analytics
    • Audit Logs
    • Application Settings
  • SDK Quickstarts

    • Quickstart — Next.js
    • Quickstart — React SPA
    • Quickstart — Hono
    • Quickstart — .NET (Authaz.Sdk)
  • Recipes

    • Recipes & Cookbook
    • Next.js — first integration
    • Next.js — B2B SaaS (multi-tenant)
    • Hono — first integration
    • Hono — B2B SaaS (multi-tenant)
    • React SPA — first integration
    • React SPA — B2B SaaS (multi-tenant)
    • .NET — first integration
    • .NET — B2B SaaS (multi-tenant)
  • Reference

    • Tokens
    • API Reference
    • Errors & Troubleshooting
  • Documentation

    • How Authaz is Built
  1. Authaz
  2. Docs
  3. Brand & Host
  4. Custom Domains

Brand & Host

Custom Domains

4 min read·Updated May 7, 2026

The Domains tab is where you put Authaz Sign-In on your own subdomain — auth.yourapp.com instead of your-app.authaz.io. Two DNS records and a verification step; SSL is provisioned automatically.

1. Add domain in dashboard           →  domain status: pending
2. Create CNAME and TXT records      →  domain status: verifying
3. Authaz validates DNS              →  domain status: verified
4. Authaz issues SSL certificate     →  domain status: SSL Active

Where it lives#

Dashboard → Application → Domains. The page lists every domain configured for the application with a status badge:

StatusMeaning
PendingDomain added; you haven't configured DNS yet.
VerifyingDNS records detected; Authaz is confirming ownership.
VerifiedOwnership confirmed. SSL provisioning starts automatically.
SSL ProvisioningCertificate is being issued. Usually takes a few minutes.
Previous
Branding
Next
Communications & Email Templates
SSL ActiveLive. Authaz Sign-In serves on this domain over HTTPS.
FailedDNS validation or SSL issuance failed — see troubleshooting below.
ExpiredThe certificate's renewal failed. Check your DNS still resolves correctly.

Adding a domain#

curl -X POST https://your-app.authaz.io/api/v1/applications/{appId}/domains \
  -H "X-API-Key: $AUTHAZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "auth.yourapp.com" }'

Response includes the two records you need to set:

{
  "id": "dom_01h...",
  "domain": "auth.yourapp.com",
  "status": "pending",
  "verificationCnameTarget": "auth.authaz.io",
  "verificationTxtRecord": "authaz-verify=01h...",
  "createdAt": "2026-04-29T10:00:00Z"
}

The dashboard's Domains page shows the same two records in a copy-friendly format with Copy buttons next to each.

DNS configuration#

You need two records in your DNS host (Cloudflare, Route 53, Namecheap, whatever):

Record 1 — CNAME (the actual routing)#

Type:   CNAME
Host:   auth          (or whatever subdomain you picked)
Target: auth.authaz.io
TTL:    Auto / 300

This points your subdomain at Authaz's edge. Once it resolves, browsers hitting auth.yourapp.com reach Authaz Sign-In.

Apex domains. CNAMEs cannot be set on apex (root) domains in standard DNS. If you want yourapp.com itself to host Authaz Sign-In (rare for auth — most teams use auth.yourapp.com), use a CNAME flattening / ALIAS / ANAME record if your DNS host supports it.

Record 2 — TXT (the verification)#

Type:   TXT
Host:   auth          (same subdomain as the CNAME)
Value:  authaz-verify=01h...
TTL:    Auto / 300

This proves you control the domain. Authaz won't issue a certificate (or even start the verification) without seeing this record.

Verification#

Authaz polls DNS every minute or so. Once both records resolve, the status flips to Verifying → Verified. SSL provisioning then starts; the cert usually issues within 1–5 minutes via Let's Encrypt.

If the domain stays in Pending after 10 minutes, check:

  • DNS propagation: dig auth.yourapp.com CNAME should return auth.authaz.io..
  • TXT presence: dig auth.yourapp.com TXT should include the authaz-verify=... value.
  • TTL: if your old DNS records had a high TTL, they may still be cached.

The dashboard's Domains page has a Retry verification button that forces an immediate poll — useful when you've just fixed a DNS issue.

What changes after activation#

Once the domain is SSL Active:

  • Authaz Sign-In is reachable at both https://auth.yourapp.com and the original https://your-app.authaz.io.
  • The OAuth 2.0 endpoints and OIDC discovery URL also live under your domain — https://auth.yourapp.com/.well-known/openid-configuration.
  • Update your application's redirect URIs to use the new domain (or both, during cutover).
  • In the SDK config, point authazIdentityDomain (or equivalent) at the new domain. The Hono and Next.js SDKs accept this directly.

The original *.authaz.io URL keeps working — there's no flag day. Migrate at your pace.

Multiple domains#

Most applications have one custom domain, but you can add several:

curl https://your-app.authaz.io/api/v1/applications/{appId}/domains \
  -H "X-API-Key: $AUTHAZ_API_KEY"
# → array of domains, each with its own status

Use cases:

  • Per-tenant subdomains. acme.yourapp.com, initech.yourapp.com — each tenant gets a branded login URL. Pair with per-tenant branding.
  • Region-specific domains. auth-eu.yourapp.com, auth-us.yourapp.com — useful for data-residency stories.
  • Marketing variants. signin.yourapp.com for one campaign, auth.yourapp.com as the canonical.

Each domain gets its own DNS records (one CNAME + one TXT) and its own SSL certificate.

Removing a domain#

curl -X DELETE https://your-app.authaz.io/api/v1/applications/{appId}/domains/{domainId} \
  -H "X-API-Key: $AUTHAZ_API_KEY"

The certificate is revoked, the routing is removed. Make sure no users are still being redirected to the old domain (your application's redirect URIs, your SDK config, your marketing pages) before deleting.

Troubleshooting#

"Failed" status with no obvious DNS error. The CNAME exists but points somewhere else (a previous host, a redirect service). Update it to auth.authaz.io. Don't stack a CNAME on top of an existing A record.

SSL provisioning failed. Almost always Let's Encrypt rate-limiting (you've hit their domain-renewal cap by deleting/re-adding too quickly). Wait an hour and retry.

Mixed-content warnings on Authaz Sign-In. Your branding includes an http:// image URL. Branding assets must be served over HTTPS — update them via the Branding page.

Cookies not persisting after sign-in. Your application is probably on a different second-level domain than Authaz Sign-In (yourapp.com vs myauthapp.com). Authaz cookies are scoped to the auth domain by design — set up your app to round-trip through Authaz Sign-In rather than relying on cross-site cookies.

Next steps#

  • Branding — make the login surface match your product.
  • Authentication — update OAuth redirect URIs to use the new domain.
  • API Reference — the Management API stays on *.authaz.io; only Authaz Sign-In moves to the custom domain.