How-to

Adding & Configuring a Custom Domain

Learn how to add a custom domain to your Vercel project, verify it, and correctly set the DNS or Nameserver values.
Table of Contents

Vercel provides all deployments with a vercel.app URL, which enables you to share Deployments with your Team for collaboration. However, to provide greater personalization and flexibility to your project, you can instead add a custom domain. If you don't own a domain yet, you can purchase it with Vercel.

You can manage all domain settings related to a project in the Domains section of the Settings tab of the project, regardless of whether you are using apex domains or subdomains in your project. This document will guide you through both options.

Hobby teams have a limit of 50 custom domains per project.

The following steps provide an overview of how to add and configure a custom domain in Vercel:

  1. On the dashboard, pick the project to which you would like to assign your domain.

    Once you have selected your project, click on the Settings tab and then select the Domains menu item:

    Selecting the Domains menu item from the Project Settings page.
    Selecting the Domains menu item from the Project Settings page.
  2. From the Domains page, enter the domain you wish to add to the project:

    Entering a domain for the project from the Domains page.
    Entering a domain for the project from the Domains page.

    If you add an apex domain (e.g. example.com) to the project, Vercel will prompt you to add the www subdomain prefix, the apex domain, and some basic redirection options. For more information on which redirect option to choose, see "Redirecting www domains".

    Choosing redirect options for your apex domain.
    Choosing redirect options for your apex domain.

    You can use your custom domain as a wildcard domain by prefixing it with *..

    If using your custom domain as a wildcard domain, you must use the nameservers method for verification.

    To add a wildcard domain, use the prefix *, for example *.acme.com.

    A wildcard domain being deployed.
    A wildcard domain being deployed.
  3. Once you have added your custom domain, you will need to configure the DNS records of your domain with your registrar so it can be used with your Project. The dashboard will automatically display different methods for configuring it:

    • If the domain is in use by another Vercel account, you will need to verify access to the domain, with a TXT record
    • If you're using an Apex domain (e.g. example.com), you will need to configure it with an A record
    • If you're using a Subdomain (e.g. docs.example.com), you will need to configure it with a CNAME record

    Both apex domains and subdomains can also be configured using the Nameservers method.

    If you are verifying your domain by changing nameservers, you will need to add any DNS records to Vercel that you wish to keep from your previous DNS provider.

    You can configure apex domains either with a A record or through the Nameservers method.

    Instructions on configuring an apex domain from the Project Domains page.
    Instructions on configuring an apex domain from the Project Domains page.

    You can configure subdomains either with a CNAME record or through the Nameservers method.

    Instructions on configuring a subdomain from the Project Domains page.
    Instructions on configuring a subdomain from the Project Domains page.

    If you choose to use Vercel's nameservers for either apex domains or subdomains, click on the Enable Vercel DNS button to opt in. Once enabled, you will be provided with the Vercel nameservers to copy and use with your registrar.

    Instructions on opting in to use Vercel Nameservers.
    Instructions on opting in to use Vercel Nameservers.

    If the domain is in use by another Vercel account, you may be prompted to verify access to the domain. Note that this will not move the domain into your account, but will allow you to use it in your project. If you have multiple domains to verify, be aware that you can only set up one TXT record at a time, but you can modify it after the domain is transferred.

    Instructions on verifying a domain by setting a DNS record on the apex domain.
    Instructions on verifying a domain by setting a DNS record on the apex domain.

Once the domain has been configured and Vercel has verified it, the status of the domain will be updated within the UI to confirm that it is ready for use.

A configured domain on the Project Domains page.
A configured domain on the Project Domains page.

If a someone visits your domain with or without the "www" subdomain prefix, Vercel will attempt to redirect them to your domain. For more robust protection, you should explicitly add this domain and redirect it .

Last updated on September 26, 2024