HOSTING / LESSON 16
Vercel Custom Domains.
Connecting your own domain

Loading the lesson…
Loading activities…
HOSTING / LESSON 16
Connecting your own domain

Loading the lesson…
Loading activities…
Right now your Vercel project lives at something like your-project.vercel.app. Which works! But what if you want your OWN domain, something like myawesomesite.com? Let's set that up.
The default .vercel.app URL gets the job done. A custom domain is just better for a handful of reasons.
myportfolio.com looks a whole lot more legit than my-portfolio-abc123.vercel.app. If you're showing your work to potential employers or clients, a custom domain makes a good first impression.
Custom domains are shorter and easier to remember. People can actually type your URL without having to look it up.
Your domain is part of your brand, and a custom one helps you plant your flag online.
You control a custom domain. Even if you leave Vercel someday, your domain comes with you. (Lowkey my favorite perk on this whole list.)
Before you can add a custom domain to Vercel, you have to own one. Here are some popular places to buy them.
Prices bounce around, but a .com is pretty cheap per year. Watch the renewal price too, since some registrars charge more after year one.
Already got a domain from somewhere else? Here's how to hook it up to Vercel.
Log in to Vercel, click on your project, then click the "Settings" tab.
In the left sidebar, click "Domains."
Type your domain name (like mysite.com) and click "Add."
Vercel will show you the DNS records you need to add. There are two common ways to do it.
Option A. Use Vercel's nameservers
Vercel can manage your whole domain for you. You'll update your registrar to point at Vercel's nameservers. This is the easiest option.
Option B. Add specific records
Keep your current DNS provider and just add records that point to Vercel. Usually that means these two.
After you update DNS, Vercel checks the records. That can take anywhere from a few minutes to a few hours, depending on how fast the DNS updates spread.
Once it's verified, your custom domain is live. Go visit it and you'll see your Vercel project.
DNS confuses basically everybody at first, so don't sweat it. Here's the simple version.
DNS is like a phone book for the internet. When someone types mysite.com, DNS tells their browser where to find your actual server.
An "A" record points your domain to an IP address. It basically says "when someone looks for mysite.com, send them over here."
A CNAME is like a nickname. It says "for www.mysite.com, go look up this other name instead," and Vercel gives you the name to point it at.
Nameservers are the source of truth for your domain's DNS. If you use Vercel's nameservers, Vercel controls all your DNS settings.
This is one of my favorite things about Vercel. SSL certificates are automatic.
SSL (now called TLS) is what puts the padlock in your browser and the "https" in your URL. It encrypts the data going back and forth between your visitors and your site.
When you add a custom domain to Vercel, this happens on its own.
You don't lift a finger and you don't pay a dime extra.
SSL certificates expire after a while. Vercel renews them for you before that happens, so you'll never have to think about it.
Vercel lets you add more than one domain to a project. That comes in handy for a few things.
You probably want both mysite.com and www.mysite.com to work. Vercel can redirect one to the other.
You could have mysite.com and mysite.io both pointing to the same project.
You can add subdomains like blog.mysite.com or docs.mysite.com.
Inside your project's domain settings, you can set up a few things.
Choose whether www.mysite.com redirects to mysite.com or the other way around.
Got more than one domain? Pick which one is the "main" production domain.
If you don't want a domain connected anymore, you can remove it here.
No domain yet? Vercel makes this part easy.
In your project settings, click "Domains."
Type the domain you want. Vercel tells you if it's available and what it costs.
If it's available, click "Buy" and go through checkout.
Vercel connects the domain to your project automatically. Zero DNS setup needed!
Hey, you finished the Vercel chapter! Look at everything you can do now.
You're ready to put your projects out there for the whole world to see. In the next module we'll start adding the other pieces most apps need, starting with how people sign up and log in...