Juneikerc.com

How to add a custom domain to Vercel

Are you ready to take your project to the next level and move from a Vercel subdomain (name.vercel.app) to a custom domain address?

In this post, you will learn how to add a custom domain to Vercel, giving your project a unique, secure, and seamless web address.

fetured image post: How to add a custom domain to Vercel

For this tutorial, I assume that you are already familiar with the platform and have deployed your project. With that clarified, let's get started.

Purchase a Domain

This point may seem obvious, but to have a custom domain on Vercel, you must first register the domain with your preferred platform. So, you need to make a minimal investment; usually, the first year is very affordable, so it's not too much.

Tip on where to buy your domain

Personally, I use DonDominio (don't worry, it's not an affiliate link) because their introductory prices are really good, and they even offer some extensions like .online for just $5.

Important Note

Some domain extensions are on sale with the first year free, but the renewal cost is quite high, so it's best to check the renewal prices offered by the company beforehand.

About free domains

I don't recommend acquiring free domains from platforms like freenom.com since they typically come with a lot of spam that you'll likely regret in the future.

Prepare your project on Vercel to assign a domain

I bought the domain juneikerc.com that belongs to this same site you are visiting. To add a custom domain to your Vercel project, follow these steps:

1. Select your project.

2. Click on the "Settings" button in the navigation bar.

3. In the sidebar, select the "Domains" option.

Panel to add domain in vercel

4. Enter the domain name and click the Add button. A modal will then appear with some redirection rules; choose your preferred one. In this case, I prefer the second option, redirecting from www. to juneikerc.com.

Domain redirection panel on Verce

Set up DNS from your provider to point to Vercel

Configure the dns to point to vercel

Next, you should point the domain's DNS to your Vercel project. Follow these steps:

  1. Log in to the account of the registrar where you purchased the domain.
  2. Locate the DNS settings for the domain. This is typically found in a section called "DNS," "Manage DNS," or "Domain and DNS."
  3. You will see a list where you need to find the option to add an A record.
  4. Assign the newly created record the name @ or the same domain name, with the IP address value provided by Vercel, in this case, it is 76.76.21.21.
Important Note

If you have a pre-existing A record, Vercel will indicate conflicts and prompt you to remove it.

Propagation of DNS on Vercel

Now that all the configuration is completed, all that's left is to wait for the DNS to propagate so you can visit the website with your new domain. This process on Vercel, based on my personal experience, shouldn't take more than 5 minutes.

Dns propagated successfully on vercel