[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# How to set up sub-domains for custom environments on Vercel

20 views · 1 like · 2 posts


Oreststryhunov 9214 (@oreststryhunov-9214) · 2026-04-02

## Current Setup
For custom environments on a project, can we have a sub-domain? For frontend and backend, we have a separate project for each.

The current domains are:
- **Backend:** `domain-management-tg1r.vercel.app` 
- **Frontend:** [website-garden.com](http://website-garden.com)

## Goal
I want to have sub-domains for a test/staging environment like this:
- **Backend:** `test.domain-management-tg1r.vercel.app` 
- **Frontend:** [test.website-garden.com](http://test.website-garden.com)

Thanks in advance.


Pauline P. Narvas (@pawlean) · 2026-04-02

Hey, @oreststryhunov-9214! Welcome :waving_hand: 

You can definitely create `test.website-garden.com`! You could either:

* Create a `test` or `staging` branch in your Git repository
* Go to your project Settings → Domains
* Add `test.website-garden.com` as a custom domain
* Click Edit on the domain and assign it to your `test` Git branch
* Configure the CNAME record with your DNS provider
* Push to the `test` branch and it will automatically deploy to `test.website-garden.com`

Or:

* Go to project Settings → Environments
* Create a new environment called "test" or "staging"
* Set up branch tracking to automatically deploy your test branch
* Attach the domain `test.website-garden.com` directly to the environment

https://vercel.com/docs/deployments/environments

[quote="Oreststryhunov 9214, post:1, topic:37525, username:oreststryhunov-9214"]
* **Backend:** `test.domain-management-tg1r.vercel.app`
[/quote]

Unfortunately, you cannot create custom subdomains on Vercel’s default `.vercel.app` domain. However, you have these alternatives:

* Use the auto-generated preview URLs for your test branch (e.g., `domain-management-test-abc123.vercel.app`)
* Add your own custom domain to the backend project (e.g., `api.website-garden.com`) and then create `test.api.website-garden.com`
* Use the Preview Deployment Suffix feature (Pro add-on) to customize all preview URLs with your own domain