Next.js Discord

Discord Forum

Additional domain not mapping to existing project on Vercel

Answered
White-crowned Sparrow posted this in #help-forum
Open in Discord
White-crowned SparrowOP
I have example.com hosted on Vercel and mapped to the main branch. Then I have another subdomain mapped to the same branch as well:

However, when I visit mybrand.example.com, I get stuck in a redirect loop with the middleware.ts not invoked on the project. I basically want two domains mapped to the same project (I don't want a redirect, just a mapping). How do I do this?

The CNAME record for mybrand points to cname.vercel-dns.com on Cloufdlare.

How do I map this to the same domain as example.com?
Answered by White-crowned Sparrow
I actually solved this by disabling proxying on Cloudflare and choosing "DNS Only".

Works now! Thank you.
View full answer

1 Reply

White-crowned SparrowOP
I actually solved this by disabling proxying on Cloudflare and choosing "DNS Only".

Works now! Thank you.
Answer