Custom Domains for AI Coders | SheCodes
Beginner 5 min read

Custom Domains for AI Coders

How to buy a domain name, connect it to your site, and go from yoursite.vercel.app to yourname.com.

In this chapter

  • Where to buy a domain and how much it costs
  • How to connect a domain to Vercel, Netlify, or Cloudflare Pages
  • What DNS records are and how to set them up
  • How to troubleshoot common domain connection issues

Do I Need a Custom Domain?

Live example
When you deploy your site, you get a free URL like yourproject.vercel.app. This works fine for testing and sharing with friends. But if you want to look professional, a custom domain like yourname.com makes a big difference.
Get a custom domain when:
You're building a portfolio or business site
You want to share a professional URL
You're launching a product or SaaS
You want people to remember your URL
Skip it for now when:
You're just learning and experimenting
The project is a personal prototype
You're not sure you'll keep the project
The free .vercel.app URL is fine for now

Where to Buy a Domain

A domain costs about $10-15/year. Here are the best places to buy one:

Cloudflare Best Price ~$10/yr Cheapest option. No markup: you pay the wholesale price. Free DNS and SSL included.
Namecheap Most Popular ~$12/yr Simple interface, good support. Free WhoisGuard privacy protection included.
Vercel Easiest ~$15/yr Buy directly from your hosting dashboard. Zero DNS setup: it just works instantly.

Domain Name Tips

Keep it short Shorter domains are easier to type, remember, and share. Aim for under 15 characters if possible.
Avoid hyphens Hyphens are hard to say out loud ('my dash site dot com') and people forget them. Stick to letters.
.com is king People automatically type .com. If the .com version isn't available, consider a different name rather than a different extension.
Check social media availability Before you buy, search for the same name on Twitter/X, Instagram, and GitHub. Matching handles build trust.
Avoid trademarked names Don't include brand names like 'Google' or 'Nike' in your domain. You could get a legal takedown notice.
Buy common misspellings If your domain is unusual, consider buying the common misspelling too and redirecting it. Costs $10/yr for peace of mind.

How to Connect Your Domain

  1. 1
    Buy your domain Go to Cloudflare, Namecheap, or Vercel and search for the domain you want. If it's available, purchase it.
  2. 2
    Open your hosting dashboard Go to your Vercel, Netlify, or Cloudflare Pages project settings. Find the "Domains" section.
  3. 3
    Add your domain Type in your new domain (e.g., yourname.com). The platform will show you DNS records to add.
  4. 4
    Update DNS records Go to your domain registrar's DNS settings. Add the records your hosting platform gave you (usually an A record or CNAME).
  5. 5
    Wait for propagation DNS changes take 5 minutes to 48 hours to spread across the internet. Usually it's under 30 minutes.
  6. 6
    SSL is automatic Your hosting platform automatically sets up HTTPS (the padlock icon). No extra steps needed.

Real World Example: Connect yourname.com to Vercel

You just bought yourname.com from Cloudflare for $10. Your portfolio site is already deployed on Vercel at yourname.vercel.app. Now you want visitors to see yourname.com instead. You add the domain in Vercel's dashboard, copy the DNS records Vercel gives you, paste them into Cloudflare's DNS settings, and within 10 minutes your site is live at your custom domain with HTTPS automatically enabled.

Build this with AI

β€œI bought the domain yourname.com from Cloudflare Registrar. My site is deployed on Vercel at yourname.vercel.app. Walk me through connecting the domain step by step. What DNS records do I need to add in Cloudflare? Should I use an A record or CNAME? How do I set up both yourname.com and www.yourname.com? And how long until it works?”

Prompt This

Connect a custom domain

β€œI bought the domain mysite.com from Cloudflare. My site is deployed on Vercel. Walk me through connecting the domain step by step: what DNS records do I need to add and where?”

Set up www redirect

β€œSet up my domain so both mysite.com and www.mysite.com work, with www redirecting to the root domain. I'm using Vercel for hosting and Cloudflare for DNS.”

Common Issues

My domain shows 'not secure' or has no padlock

SSL certificates take a few minutes to activate after connecting your domain. Wait 10-15 minutes and refresh. If it still doesn't work, check your hosting platform's SSL settings.

www.mysite.com works but mysite.com doesn't (or vice versa)

You need to set up both the root domain (mysite.com) and the www subdomain (www.mysite.com). Most hosting platforms let you add both and redirect one to the other.

Changes aren't showing on my custom domain

DNS propagation can take up to 48 hours. Try clearing your browser cache, or test from a different device or incognito window.