Hello Vercel Community,
I am experiencing a persistent DNS_HOSTNAME_RESOLVED_PRIVATE error on my Vercel project when my application, attempts to complete the Auth0 login flow. I am on the Hobby (free) plan.
404: NOT_FOUND
Code: DNS_HOSTNAME_RESOLVED_PRIVATE
ID: fra1::2hgmz-1748359167188-87ace65c989b
Read our documentation to learn more about this error.
Project Details:
- Production Domain:
https://www.domain.com - Auth0 Custom Domain:
https://auth.domain.com
Problem Description:
- My Vercel app’s
/api/auth/loginendpoint returns200 OKin Vercel logs, indicating it’s initially working. - However, after initiating the Auth0 flow and returning to my Vercel application, I receive a
404: NOT_FOUNDpage with theDNS_HOSTNAME_RESOLVED_PRIVATEerror (e.g.,fra1::k45qr-1748355475782-b35b79dddb20). - The login flow works perfectly on
http://localhost:3000.
My Setup & Checks:
- DNS Configuration:
www.domain.comcorrectly points to Vercel (A-record to76.76.21.21or CNAME tocname.vercel-dns.com). Vercel shows “Valid Configuration” for this domain.auth.domain.comcorrectly points to Auth0 via a CNAME record (e.g.,dev-***.edge.tenants.us.auth0.com). This is essential for my custom Auth0 domain. My DNS provider correctly handles this, and external DNS lookups showauth.domain.comresolving to Auth0.- Vercel’s domain settings UI suggests adding a CNAME for
auth.domain.comtocname.vercel-dns.com, but this conflicts with my Auth0 CNAME and would break my Auth0 custom domain setup.
- Vercel Environment Variables:
APP_BASE_URLis set tohttps://www.domain.comfor Production.AUTH0_DOMAINis set toauth.domain.comfor Production.- All other
AUTH0_*variables are correctly configured for Production.
- Auth0 Application Settings:
Allowed Callback URLs:https://www.domain.com/auth/callback,http://localhost:3000/auth/callbackAllowed Web Origins:https://www.domain.com,http://localhost:3000Allowed Logout URLs:https://www.domain.com,http://localhost:3000- All these URLs are precisely configured.
My Hypothesis:
Given that external DNS for both domains is correct, and my Vercel app logs show a 200 for the initial /api/auth/login request, I suspect this DNS_HOSTNAME_RESOLVED_PRIVATE error is occurring due to an internal DNS resolution or networking issue within Vercel’s platform when my serverless function tries to communicate with auth.domain.com (my custom Auth0 domain) during the authentication process.
Any help or insights from the community, or Vercel staff who monitor the forums, would be greatly appreciated.
Thank you.