Connecting a Custom Domain to Vercel
If you’re using Vercel to deploy your projects, connecting a custom domain is straightforward and only takes a few steps. Here’s a quick guide to get your domain up and running with your Vercel-hosted application.
Step 1: Add Your Project to Vercel
- Deploy your app to Vercel (e.g., using vercelCLI or GitHub integration).
- Open your project dashboard on Vercel.
Step 2: Add Your Custom Domain
- Go to Project Settings → Domains.
- Click “Add” and enter your custom domain (e.g., yourdomain.com).
- Vercel will check if the domain is already configured. If not, it will guide you to add DNS records.
Step 3: Configure DNS Records
You need to update your domain registrar's DNS settings.
Vercel typically requires:
- 
A Record:
Points @(root domain) to Vercel’s IP:
  76.76.21.21
- 
CNAME Record:
Points wwwtocname.vercel-dns.com.
If you’re using a subdomain (e.g.,
blog.yourdomain.com), add a CNAME for that subdomain pointing tocname.vercel-dns.com.
Step 4: Verify the Domain
- After updating DNS records, return to your Vercel dashboard.
- Click Verify on the domain you added.
- DNS propagation might take a few minutes (or up to 24 hours).
Step 5: Set as Primary Domain
- Once verified, set the domain (e.g., yourdomain.com) as the primary domain in the Vercel dashboard.
- Optionally, redirect wwwto your main domain (Vercel provides a toggle for this).
Step 6: Enable HTTPS
- Vercel automatically provisions SSL/TLS certificates (via Let’s Encrypt) for your domain.
- Within a few minutes, your site will be accessible via https://yourdomain.com.
Pro Tips
- 
Subdomains: You can add multiple subdomains in the same way (e.g., api.yourdomain.com).
- Custom DNS: If your DNS is not managed by your domain provider, you can use Vercel’s built-in Vercel DNS for simplicity.
- 
Instant Preview Links: Keep using Vercel’s preview URLs (.vercel.app) while working on staging versions.
Conclusion:
That’s it! You’ve successfully connected your custom domain to your Vercel project. Now your application is live at your own branded domain.
 


 
    
Top comments (0)