Guide · 2026-03-04

Buy a Domain and Connect It to Your App

Buy a domain on Namecheap and connect it to Vercel, Railway, or Cloudflare. DNS records explained with exact values to copy.

Fast read

Last updated
Apr 7, 2026
What this answers
Buy a domain on Namecheap and connect it to Vercel, Railway, or Cloudflare. DNS records explained with exact values to copy.
Use this when
You need the useful version, not the generic setup checklist.

Quick Answer

Buy a Domain and Connect It to Your App

Buy a domain on Namecheap and connect it to Vercel, Railway, or Cloudflare. DNS records explained with exact values to copy.

What You'll Do

Buy a domain (~$10/year), configure DNS, and connect it to your deployed app. SSL certificate is automatic. Takes about 15 minutes.

Step 1: Buy Your Domain

Go to namecheap.com → Search your domain → Add to cart → Checkout.

Domain pricing reality:

.com     $8-12/year    — most trusted
.app     $14-20/year   — good for apps
.dev     $12-15/year   — developer-friendly
.io      $30-50/year   — popular but pricey
.co      $20-30/year   — startup-friendly

Always check the renewal price before buying. Some registrars charge $1 first year, $40+ renewal.

Checkpoint: Domain appears in Namecheap dashboard as "Active".

Step 2: Connect to Vercel

In Namecheap Dashboard → Domain List → Manage → Advanced DNS → Add New Record:

Type: A Record
Host: @
Value: 76.76.21.21
TTL: Automatic

Type: CNAME Record
Host: www
Value: cname.vercel-dns.com
TTL: Automatic

Delete any existing A or CNAME records for @ and www first.

Then in Vercel → Project Settings → Domains → Add your domain.

Checkpoint: Vercel shows green checkmarks for both yourdomain.com and www.yourdomain.com.

Step 3: Connect to Railway (Alternative)

Railway Dashboard → Settings → Networking → Custom Domain → Enter domain.

Railway shows a CNAME record — add it in Namecheap → Advanced DNS:

Type: CNAME Record
Host: @
Value: [shown-in-railway].up.railway.app
TTL: Automatic

Step 4: Move DNS to Cloudflare (Recommended)

If using Cloudflare Workers, or for better DNS performance:

  • Cloudflare Dashboard → Add site → Enter domain → Free plan
  • Note the two nameservers Cloudflare shows
  • Namecheap → Domain List → Manage → Nameservers → Custom DNS → Enter Cloudflare's nameservers
  • Moving DNS to Cloudflare is free and gives you DDoS protection, faster DNS globally, and easy management.

    Checkpoint: Cloudflare shows "Cloudflare is now protecting your site".

    Step 5: Wait and Verify

    DNS changes take 5 minutes to 2 hours. Check at whatsmydns.net.

    bash
    curl -I https://your-domain.com

    Checkpoint: Shows HTTP/2 200 and your domain loads with green SSL padlock.

    If SSL stays "pending" for hours, check DNS records match exactly. One wrong character prevents SSL. See domain fix.

    Next Steps

  • Deploy to Vercel — detailed guide
  • Deploy to Railway — for backend apps
  • Cloudflare guide — edge deployment