Having two subdomains

How can I accomplish having two subdomains in a Nextjs project that works well with Clerk? I want www. for public facing (homepage,about,etc...) and app. subdomain for logged in part of my site.
4 Replies
Rhys
Rhys2y ago
Vercel Documentation
How to Build a Full-Stack Multi-Tenant App Using Next.js
Learn how to create and deploy a full-stack application with multi-tenancy and custom domain support using Next.js, Prisma, PlanetScale, and Tailwind CSS.
Rhys
Rhys2y ago
I’m not sure about cookies and auth with that though, I think you’re going to need to do CORS and have the auth cookie set to your main domain
Sammy
SammyOP2y ago
Yeah I read through that one. I'll have to experiment with it. Would it be better to separate them into two different projects? My thinking there is the public facing part of my site has no need for APIs. It's basically rendering static web pages (i.e. home, about, contact us, etc..)
James Perkins
James Perkins2y ago
If you only need app.domain.com for Clerk you can create your static site in one project and Clerk project. Otherwise if your user base is going to be the same then Clerk would work out of the box.
Want results from more Discord servers?
Add your server