Third level subdomain on vercel.app

so, i’m trying to deploy an app with subdomains, which i’m handling using nextResponse.rewrite in middleware.

but the vercel preview URLs don’t support this since they follow the format name.domain.vercel.app.

is there a way to make this work or deploy preview URLs on my own domain? thanks.

You can do a third level with the format <sub>.<team-name>.vercel.app. Otherwise, you can use your own custom domain for more flexibility with subdomains.

Hope that helps!

yeah, but can I configure my custom domain so that each branch gets its own URL, like Vercel’s preview URLs?

You can assign a domain (or subdomain) to a git branch or configure custom environments

right, but i’d have to add these manually, right? i was looking for something that automatically creates them, like vercel preview urls—without having to set up complex github actions myself.

Just some other information, If you are looking to specifically handle preview deployment urls, you can use this documentation (pro and enterprise accounts only) to bring your own domain instead of using the vercel.app suffix.

Exactly what i was looking for, thanks a ton.