I am trying to get my head around adding a domain to my account.
I would like to be able to add a domain (example.com) and then create subdomains (sub.example.com) to different projects. I want to use the root domain for some links to example projects and then each sub domain to the example projects (bit of a simple portfolio type thing). The portfolio will have different types of project and I don’t want them to be sub folders within the main project, but their own sites on sub-domains.
When I try and add a domain, it asks me to specify the project, I don’t want to do that. I want to be able to manage the sub domains and which projects they point to within vercel not have to use the domain host to setup the sub and then point to a vercel project.
Can I just point my nameservers to vercel? If so where do I configure vercel to accept them for the domain in my account?
I understand your confusion about adding domains to your Vercel account and managing subdomains. Let me clarify how domain management works, hopefully this helps!
When you add a domain to Vercel, you typically need to associate it with a project.
Vercel allows you to add both root domains and subdomains to your projects - they are configured at the project level, not globally for your account. You can manage these through the Vercel dashboard or using the Vercel CLI.
For your use case of having different subdomains point to different projects, you would need to configure each subdomain separately within each project’s settings.
Here’s how you can set up your portfolio with subdomains:
For each project (main portfolio and example projects)
Option 1: Using Vercel DNS
a. Add your domain to Vercel and enable Vercel DNS
b. Update your domain’s nameservers at your registrar to those provided by Vercel
c. In Vercel, add A records for your root domain and CNAME records for subdomains
Option 2: Using your current DNS provider
a. Add an A record for your root domain pointing to Vercel’s IP
b. Add CNAME records for each subdomain pointing to the respective Vercel project URL
This approach allows you to manage each project and its associated domain/subdomain within Vercel, while still achieving your goal of having different subdomains for different projects.
There are two ways to configure your domain:
Using Vercel as your nameserver (Vercel DNS)
Using your existing nameservers and adding the necessary DNS records
Custom domains are available on the free tier.
Does that help answer your question?
We also have a number of domain guides which may be helpful