Auth0 custom domain: setup, Google sign-in and troubleshooting
Google's sign-in screen usually shows <tenant>.auth0.com because, with Auth0, the Google sign-in runs through your Auth0 tenant domain; an Auth0 custom domain such as login.example.com moves login, and Google's redirect URI, onto your own domain.
You need three things together: the custom domain set up in Auth0, your own Google client keys (Auth0 developer keys don't work with custom domains), and https://login.example.com/login/callback in Google Cloud.
Why Google shows auth0.com
Auth0's Google connection sends users back to https://{yourDomain}/login/callback, and {yourDomain} is your tenant domain until you add a custom domain. Google's branding help says that until an app's branding passes Google's verification, "only your application domain will be visible to users". With Auth0 in the middle, the domain users see is typically the tenant domain, for example "continue to your-tenant.us.auth0.com". Once a custom domain is set up and the Google connection and redirect URI use it, users should see your domain instead (or your app name, if your Google branding has passed verification).
Before you start
- Plan and billing. Auth0's docs state that a tenant needs a valid credit card on file to set up a free custom domain (the card is not charged). Self-managed certificates require an Auth0 Enterprise subscription.
- One domain per tenant with Auth0-managed certificates.
- Pick the domain. Most guides, including this one, use a subdomain you don't use for anything else, such as
login.example.com. If you plan to use passkeys, read Auth0's custom domains overview first: it recommends the root domain in that case, because passkeys are bound to the domain. - Own Google keys. Auth0 developer keys can't be used with custom domains, so create a Google OAuth client first (see below).
- Users get signed out. Existing sessions become invalid after the switch, and Auth0 notes users may need to clear the cookie if they see login errors.
Option A: Auth0-managed certificate (most setups)
Auth0 issues and renews the certificate (every three months) as long as your DNS record stays in place.
- In the Auth0 Dashboard, open Branding → Custom Domains (some tenants show Settings → Custom Domains; as of Oct 2026).
- Enter
login.example.com, choose Auth0-managed certificates, and select Add Domain. - Copy the CNAME value Auth0 shows and create this record at your DNS provider:
Type: CNAME
Name: login.example.com (often just "login" in the DNS UI)
Value: <the value shown in the Auth0 Dashboard>
TTL: default
- Back in Auth0, select Verify. It can take a few minutes depending on your DNS; once it succeeds, the domain should be ready within 1 to 2 minutes.
Cloudflare DNS: set this record to DNS only (gray cloud), not Proxied (orange cloud). Auth0 support states a proxy is not supported with Auth0-managed certificates, and a proxied record can keep the domain in Pending Verification indefinitely. Auth0 also recommends turning off CNAME flattening; it is unsupported for Auth0-managed certificates.
Option B: Self-managed certificate behind Cloudflare (Enterprise)
Use this only if you must keep the Cloudflare proxy on.
- In Branding → Custom Domains, add the domain with Self-managed certificates (as of Oct 2026).
- Add the TXT record Auth0 shows, then select Verify. If it isn't done within three days, repeat the steps.
- Save the Origin Domain Name (like
{yourTenant}-<CUSTOM_DOMAIN_ID>.edge.tenants.us.auth0.com) and the cname-api-key. Auth0 shows the key only once. - In Cloudflare (the custom domain must not already exist in the zone):
- CNAME
login.example.com→ the Origin Domain Name, Proxied. - A Page Rule on the custom domain with Host Header Override = Origin Domain Name and True-Client-IP enabled. Auth0's recommended approach needs a Cloudflare Enterprise plan for these features. - A Transform Rule (Modify Request Header) that sets a static headercname-api-keyto your key, scoped to the custom domain hostname. - Always Use HTTPS on and SSL/TLS mode Full or stricter. The proxy must use TLS 1.2 or newer. - Tell Auth0 which header carries the visitor IP:
curl -X PATCH "https://<tenant>.us.auth0.com/api/v2/custom-domains/<CUSTOM_DOMAIN_ID>" \
-H "Authorization: Bearer <MANAGEMENT_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "custom_client_ip_header": "true-client-ip" }'
The Management API reference for this call is "Update custom domain configuration". Test this proxy setup on a staging tenant before relying on it.
Auth0's guide notes Cloudflare Workers can replace the Page and Transform rules, but recommends the rules because they need no custom code. If you add Managed Challenges, keep them off /oauth/token, /api/v2/* and /samlp/*.
Point Google sign-in at the custom domain
- Google Cloud (as of Oct 2026): Google Auth Platform → Clients → create or open a Web application client and set:
Authorized JavaScript origins: https://login.example.com
Authorized redirect URIs: https://login.example.com/login/callback
You can keep the tenant-domain URI (https://<tenant>.us.auth0.com/login/callback) during the switch so apps still on the old domain keep working. Google says changes can take 5 minutes to a few hours to take effect.
-
Auth0 (as of Oct 2026): Authentication → Social → Google / Gmail, paste your own Client ID and Client Secret instead of developer keys, save, and use Try Connection.
-
Your app: initialize the SDK with the custom domain, not the tenant domain:
# @auth0/nextjs-auth0 v4 (.env.local)
AUTH0_DOMAIN=login.example.com
// @auth0/auth0-spa-js
import { createAuth0Client } from "@auth0/auth0-spa-js"
const auth0 = await createAuth0Client({
domain: "login.example.com",
clientId: "<AUTH0_CLIENT_ID>",
authorizationParams: { redirect_uri: window.location.origin },
})
- Your APIs: tokens carry the
issof the domain used to get them, so validate the issuer ashttps://login.example.com/. Theaudiencedoesn't change, and Auth0's own APIs such as/api/v2/keep the tenant domain as audience.
If you use a customized Universal Login page with Lock or Auth0.js, it also needs the configurationBaseUrl / overrides settings described in Auth0's custom domain feature guide.
Custom domain not working: troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Stuck in Pending Verification | Proxy enabled on the CNAME (Cloudflare orange cloud). Switch to DNS only, or use self-managed certificates. |
| "Your verification record was not found" | DNS hasn't propagated (allow up to 48 hours) or the value is wrong. Check with dig login.example.com CNAME +short and compare with the Dashboard. |
| Still pending after the checks pass | Auth0's docs say to wait at least four hours and select Verify again, without re-creating the domain (re-creating can interrupt service). Auth0 keeps checking for up to seven days. One Auth0 support article adds that if it still hasn't validated more than seven days after creation, you can delete and re-create it; check with Auth0 support before doing that on a domain in use. |
| Verification fails although CNAME is right | An A record on the same name, CNAME flattening, or a CAA record blocking issuance. Check CAA with dig login.example.com +short CAA. |
| "Domain conflicts with network configuration" | Usually a Cloudflare Zone Hold. Remove the hold, select Verify, then re-enable it. |
Google still says auth0.com |
Likely causes: your app still uses the tenant domain, the Google connection still uses developer keys, or the Google redirect URI isn't on the custom domain. |
Google redirect_uri_mismatch after switching |
Add https://login.example.com/login/callback exactly to the Google client whose keys Auth0 now uses. |
| Management API calls rejected | Tokens obtained through the custom domain must be used with the custom domain. |
To read the current state, run auth0 domains list (Auth0 CLI) or call GET /api/v2/custom-domains and check status, verification.status and certificate.status.
How to confirm it worked
- The custom domain shows as ready in Branding → Custom Domains.
- Clicking "Log in" in your app opens
https://login.example.com/authorize?..., not the tenant domain. - Google's sign-in screen names
login.example.com(or your app name) instead of the tenant domain. - An ID token from a test login has
"iss": "https://login.example.com/".
Related guides: Change the app name on Google sign-in · Google OAuth consent screen · redirect_uri_mismatch explained
FAQ
Is an Auth0 custom domain free?
Auth0's docs say a valid credit card must be on file to set up a free custom domain, and that the card isn't charged. Self-managed certificates are limited to Enterprise subscribers. Check your own tenant's plan page for anything beyond that.
Can I use Cloudflare's orange-cloud proxy with an Auth0 custom domain?
Not with Auth0-managed certificates: Auth0 support says a proxy isn't supported there and it can leave the domain pending. To proxy through Cloudflare, use self-managed certificates with the Host Header Override and cname-api-key setup.
Why does Google still show auth0.com after I added a custom domain?
Until your Google branding passes verification, Google shows users your application's domain, and with Auth0 that is typically the domain the sign-in runs through. If your app still calls the tenant domain, or the Google connection uses Auth0 developer keys (which can't be used with custom domains), the old domain is likely to remain. Switch the SDK domain and add your own Google client keys.
How long does Auth0 custom domain verification take?
Often a few minutes, but Auth0 support notes DNS propagation can take up to 48 hours. If it's still pending after your checks pass, Auth0's docs say to wait at least four hours and reverify without re-creating the domain.
Do I need to change my Auth0 callback URLs in my app?
Auth0's custom-domain feature guide doesn't list your app's own callback URLs (where Auth0 returns users) among the things to change. What it does list includes the SDK domain, token issuer checks, and the redirect URI at Google, which becomes https://<custom-domain>/login/callback.
Sources
- Custom Domains | Auth0 Docs
- Configure Custom Domains with Auth0-Managed Certificates | Auth0 Docs
- Configure Custom Domains with Self-Managed Certificates | Auth0 Docs
- Configure Cloudflare as Reverse Proxy | Auth0 Docs
- Configure Features to Use Custom Domains | Auth0 Docs
- Add Google Login to Your App | Auth0 Docs
- Test Social Connections with Auth0 Developer Keys | Auth0 Docs
- Troubleshoot Auth0 Custom Domains Issues | Auth0 Support
- Custom Domain Fails to Validate | Auth0 Support
- Manage OAuth App Branding | Google Cloud Platform Console Help
- auth0/nextjs-auth0 | GitHub
- auth0/auth0-spa-js | GitHub
- Proxy status | Cloudflare DNS docs
- Manage OAuth Clients | Google Cloud Platform Console Help
How this page was made: drafted with AI from the sources listed, reviewed by Pewterkit. Docs checked 27 Oct 2026. Spotted something out of date? Tell us.