# Your own domain

> Every Vercel project starts with a free `.vercel.app` address, and whenever you're ready you can attach your own custom domain—like `myproject.app` or `myproject.com`—by pointing its DNS records to Vercel, which issues your HTTPS security certificate automatically and redirects `www`.

## Analogy

Think of the internet's phone book. Your app's building on Vercel stays in the exact same place; buying a custom domain simply registers a short, memorable name in the directory and forwards anyone who dials it straight to your front door.

## How it works

The free `<project-name>.vercel.app` address vercel gives your app is a real, permanent production link—you never have to buy a domain just to learn or to share your project with friends. When you want a shorter, branded address (such as `.app` or `.com`), you register it for an annual fee through a domain registrar (like Cloudflare Registrar, Porkbun, Namecheap, or directly inside Vercel).

To connect a domain you bought elsewhere, open your project on Vercel → **Settings** → **Domains**, type your domain, and Vercel shows you two lines to copy into your registrar's **DNS** settings (the internet's address book): an **A record** for the root domain (`example.com`) and a **CNAME record** for `www.example.com`. Set one as primary and let Vercel redirect the other with a **301 permanent redirect** so visitors and search engines always land on one canonical address.

Once the DNS records point to Vercel (which usually takes a few minutes), Vercel automatically issues and renews your **HTTPS** certificate—the encrypted connection every browser expects. Note that `.app` domains require HTTPS by default, which Vercel handles for you without any extra setup.

If your app uses Better Auth for logins or sets canonical links in code, remember to update your production `BETTER_AUTH_URL` env-var in Vercel to your new `https://...` domain and trigger a fresh deploy so sign-in cookies and redirects match the new address.

## In your project

Buying a domain and editing DNS records happen in your browser, so your agent guides you click by click and waits for your “done”. Then your agent checks which environment variables or metadata URLs in your project reference the old `.vercel.app` address and helps you update them cleanly.

## Copy for your agent

```text
I want to connect my custom domain to our Vercel project. List every place in our code or Vercel environment variables (like BETTER_AUTH_URL) that needs the new domain, and guide me through the Vercel Domains and DNS steps one by one.
```

---
Source: [Agentic Makers](https://agenticmakers.app/en/learn/your-own-domain) · License: CC BY 4.0
