Custom domains aren't routing to my Next.js app on Vercel despite correct DNS setup Current setup:
Next.js app (Pages Router) Multi-tenant blog platform where each tenant gets their own subdomain File structure: src/pages/_sites/[site]/blog/[...slug].js ISR for static generation with fallback: "blocking"
What's working:
*.my-domain.com works perfectly (e.g., company1.my-domain.com/blog) and we get a site param from params in our getStaticProps in next js for isr and we fetch content based on that site param Middleware correctly processes these subdomain requests and writes it to _sites/[site] correcttly giving me access to site value All routes and content load as expected for these URLs
What's not working: if somebody wants to connect their custom sub domain for example i thought the redirect would happen at a DNS level, as once if i ask the user to add my cname in their provider we can have requests coming from blogs.companyName.com -> being pointed to our compannyName.my-domain.com, as once somebody signs up we automatically assign them theirName.my-domain.com this is what I'm asking him to add in his provider Type: CNAME
Host: blogs or whatever you want
Value: cname.my-domain.com.
TTL: Automatic
DNS is configured correctly:
Customer's DNS: blog.customerdomain.com CNAME points to cname.my-domain.com My Vercel DNS: cname.my-domain.com CNAME points to cname.vercel-dns.com nslookup confirms the CNAME chain works
The problem: once he hits a verify button after he has added the c-name, i query a dns provider and check whether the c-name is indeed there or not and yes the c-name is indeed there when i visit that url blogs.my-second-domain.com - get a 404 from vercel which means the dns did get pointed to that of vercel however it did ot even reach my project rather went on that 404 not found page of vercel as fallback. Middleware logs don't appear, suggesting requests never reach my app Vercel has *.my-domain.com configured in project settings
Need help with:
Why aren't custom domain requests reaching my app and how can i start pointing blogs.companyName.com to clientsName.my-domain.com -> for this will i have to create a new c-name or what should be the exact snippet i should give to the client or show on their UI and is it even possible? and if so can somebody please break down the steps 🙏🙏🙏 I'm attaching a few screenshots from the vercel dashboard, name cheap of a second domain that im testig this with and that 404 page

Please guys can somebody help 🙏