By default, all deployments are assigned a .vercel.app
suffixed domain.
This domain can be replaced with a Custom Domain of your choice. This Custom Domain can be purchased with Vercel or a third-party.
In this document, adding a domain to your Vercel projects is explained in detail.
Adding a Domain
If you don't own a domain yet, you can purchase it with Vercel. Then, once you own a domain, adding it to a project is very straightforward:
Step 1: Selecting Your Project
On the dashboard, pick the project to which you would like to assign your domain:
Step 2: Navigating to Domain Settings
Once you have selected the project of your choice, click on the Settings tab:
Then, select the Domains menu item:
Step 3: Entering Your Chosen Domain
From the Domains page, enter the domain you wish to add to the project:
Step 4: Configuring the Domain
Once the domain has been added, you will be presented with different methods for configuring it, depending on whether it is an apex domain (example.com) or subdomain (docs.example.com).
Apex domains can be configured with a A record, while subdomains can be configured with a CNAME record. Both domain types can also be configured using the Nameservers method.
Apex Domains
You can configure apex domains either with a A record or through the Nameservers method.
Subdomains
You can configure subdomains either with a CNAME record or through the Nameservers method.
Vercel Nameservers
When selecting the Nameservers method of configuration for either apex domains or subdomains, you will be provided with the Vercel nameservers to copy and use with your registrar.
For your convenience, you can also find these listed below:
ns1.vercel-dns.com ns2.vercel-dns.com
Step 5: Domain Configured
Once the domain has been configured, the card status will change to reflect this.
DNS Records
Once a domain has been added, all of its DNS Records can be found in the Advanced Settings page. From there, you can view and manage the records.
Step 1: Selecting your Domain
On the dashboard, click on the Domains tab:
Once on the Domains tab, click on a domain of your choice to view its Advanced Settings page.
Step 2: Add DNS Record
Once on the Advanced Settings page of your domain, fill out the DNS Record form and click on the Add button.
Using the form mentioned above, you can then add the DNS Record of your choice. The following types are supported:
A
AAAA
ALIAS
CAA
CNAME
MX
SRV
TXT
DNS Email Presets
To be able to receive emails through a Domain that you've added to Vercel, you need to add the respective DNS Records of type MX
.
For most common third-party email providers, Vercel makes this process really easy, because you can add those missing DNS Records using so-called DNS Email Presets on your dashboard.
In order to make use of them, navigate to the Domains page of your Personal Account or Team, click the Domain of your choice and click the Add Email Preset button on the right:
You will be presented with a list of commonly used third-party email providers. If yours is in the list, select it and the necessary MX
DNS Records will automatically be configured on your Domain.
If your email provider is not in the list, please refer to their documentation and dashboard to find out which MX
DNS Records you need to add.
Wildcard Domains
You can use your Custom Domain as a Wildcard Domain by prefixing it with *.
.
To add a Wildcard Domain, follow the steps to add a domain. At step 3, use the prefix *
(e.g. *.acme.com
).
After the verification process is complete, the status of the domain will be updated within the UI to confirm that it is ready for use.
Deploying with Your Domain
Once the domain has been added to your project and configured, it is automatically applied to your latest deployment.
When a Custom Domain is assigned to a project that's using Git, each push (including merges) to the Production Branch (commonly main
) will trigger a deployment to the defined domain.
Reverts take effect immediately, assigning the Custom Domain to the deployment made prior to the point the revert is effective from.
Redirecting Domains
You can add domain redirects from the Domains tab when more than one domain is present for the project. This provides a way to, for example, redirect a www
subdomain to an apex domain but can be used in a variety of ways.
To add a redirect, click the Edit button for the domain you want to redirect from and use the Redirect to dropdown to select the domain you want to redirect to:
Renewing Domains
Custom Domains purchased through or registered with Vercel are automatically renewed by default. You can choose to prevent the automatic renewal of a Domain from the Domains tab on the Vercel Dashboard:
Once on the Domains tab, click on a Domain of your choice to view its Advanced Settings:
The auto renewal status of your Domain is displayed here as either "on" or "off":
You can toggle auto renewal from the details menu in the top right:
Auto Renewal Off
If auto renewal is off, Vercel will not try to re-register the Domain when it expires at the end of the registration period. You will not be charged for the Domain any longer, but you will lose access to the Domain when it expires. Recovering the Domain, if even possible, may be subject to a redemption fee of $85 USD. Please contact our support team as soon as possible.
Vercel will send you three emails regarding the Domain before this happens. 24 and 14 days before the Domain is set to expire, you will be notified that auto renewal is off and the Domain will expire soon. A final email will notify you when the Domain expires.
Auto Renewal On
If auto renewal is on, Vercel will begin daily attempts to renew the domain one week before the domain expires. You will receive three emails regarding the renewal process: 17 days and 7 days before renewal attempts begin, and finally when the Domain has either been successfully renewed or failed to renew.
Third-Party Domains
Third-Party Domains (ones not purchased with or transferred into Vercel) are not subject to auto-renewal. Please refer to your Domain name registrar's policy regarding renewals.
Moving Domains
You can move domains to another profile or team using the Domains tab from the Vercel Dashboard.
Once on the Domains tab, select the domain(s) you wish to move by using the checkbox next to each domain then click Move.
After selecting the domain(s) and clicking Move, you will be asked to confirm which profile or team you wish to move them to.
When selecting the input field, you will be provided with a list of teams you belong to. If the profile or team you wish to move the domain(s) to is not present, enter the slug
value instead. You can find the slug
value in Settings page for both profiles and teams.
To confirm the change, select Move. The domains will be transferred to the new profile of team immediately.
Assigning a Domain to a Git Branch
Every commit pushed to the Production Branch of your connected Git repository will be assigned the domains configured in your project.
In order to automatically assign a domain to a different branch, you can enter it in the Git Branch field of your Domain:
Removing a Domain
To remove a domain that is assigned to a project, navigate to the Domains tab from the Project Overview and click the Edit button for the domain you want to remove:
Once the Edit button has been clicked, you will be presented with further options. Click the Remove button to remove the domain from the project:
Provider Specific Instructions
Cloudflare
To use Cloudflare-managed domains, follow these steps:
- Configure your domain such that SSL is disabled for the path
/.well-known/**
. - Run
curl http://<domain>/.well-known/acme-challenge
(Replace<domain>
with your domain. Notice that it’shttp
and nothttps
).
If the above curl
command returns an error (e.g. {"error":{...}}
), then you’re good to go - it means that Vercel can generate certificates successfully. Otherwise, make sure that SSL is disabled for /.well-known/**
and try again.
Related
For more information on what to do next, we recommend the following article: