You put the running-club site online a week ago, at the free link your host gave you: running-club-site-x7k2.vercel.app. After a group run you read that link out to the new members so they can find the site. Two of them ask you to spell it, and one types it wrong and gets an error page. That evening you ask the agent to email everyone who signed up for the weekend run. The agent replies that the email service will not send to the members yet. Until the club has its own domain name, the service only sends test messages to your own address.
A domain name is the address people type to open a website, such as runclub.example. Once the club has one, members can find the site easily and the email service will send to them. In this chapter you buy a domain name, connect it to the site you already built, and set up email so that your messages arrive in the inbox and not in the spam folder.
What a domain name costs and how to buy one
You do not buy a domain name once and keep it forever. You pay a yearly fee to a registrar, which is a company that sells domain names, and the name is yours for as long as you keep paying. A name that ends in .com costs about ten to twenty dollars a year. Many registrars charge less for the first year and more for every year after that, so check the renewal price before you pick a registrar.
Make these decisions before you pay:
- Which name to buy. Pick a name that is short, easy to say out loud, and hard to misspell. If the .com version is already taken, a different ending such as .club or .org is fine.
- Whose account holds it. Buy the domain name yourself, in a registrar account that you opened with your own email address. If a freelancer or a friend buys it in their account, they control it, and you need them every time it has to be renewed or changed.
- Automatic renewal. Turn it on, and pay with a card that will still be valid a year from now.
After you buy the name, the registrar emails you to confirm your email address. Click the link in that email within 15 days. If you do not, the registrar can switch your domain name off until you confirm.
How a browser finds your site from its domain name
Buying a domain name does not connect it to your site. You make that connection yourself, and it is easier once you know how a browser uses a domain name.
Every computer on the internet has an IP address, a number such as 203.0.113.10 that other computers use to reach it. A browser needs the IP address of the computer that runs your site, but people remember names far more easily than numbers. So the internet has a public directory called DNS, short for Domain Name System, that stores the IP address for each domain name. When someone types runclub.example, their browser asks DNS for the IP address stored under that name, and then loads your site from the computer at that address. The contact list on your phone works the same way: you tap a person's name, and the phone dials the number saved under it.
Each entry in the directory is called a DNS record. You add and edit the records for your domain name on your registrar's website. A new site needs four types of record:
Two of the records connect your domain name to your site, and the other two are for email.
- An A record holds the IP address of the computer that runs your site.
- A CNAME record connects one name to another name, so that both open the same site. You add one so that www.runclub.example opens the same site as runclub.example. The www in front is called a subdomain.
- An MX record holds the name of the mail service that receives email sent to addresses at your domain name, such as help@runclub.example.
- A TXT record holds a line of text that other computers can look up. Email providers look up your TXT records to check that an email with your domain name on it really came from you, and the email section below explains how.
DNS is a public directory that stores, for every domain name, the IP address of the computer that runs the site. You control the records for your own domain name. If you move your site to a different host later, you change one record and your address stays the same.
Connect your domain name to your site
Your host's website guides you through these steps. If you bought the domain name from your host, the host adds the DNS records for you, and you can skip steps 2 and 3.
- Add the domain name to your project. On the host's website, open your project, go to the Domains page in its settings, and type in your domain name. The host then shows you the DNS records it needs, which are usually one A record and one CNAME record.
- Add those records at your registrar. On the registrar's website, open the DNS page for your domain name and add each record exactly as the host shows it.
- Wait for the change to take effect. A DNS change does not take effect right away. Internet providers keep their own saved copies of DNS records and refresh them on a schedule, so a new record can start working within minutes for some people and take a day or two for others. The host's Domains page shows when the host can see your records.
- Check that the address starts with https. Open your domain name in a browser. The s means the connection between the visitor and your site is encrypted, so other people on the same network cannot see what is sent. This is called HTTPS. To turn HTTPS on, a site needs a certificate, a small file confirming that the site really belongs to that domain name. Hosting platforms like the ones in Hosting, renting a computer on the internet get the certificate for you once they see your records, and they renew it automatically.
- Choose one main address. Your site now opens at both runclub.example and www.runclub.example. Pick one of them as the main address, and on the host's Domains page set the other one to send visitors to it, so that everyone ends up at the same address.
When your site opens at your own domain name, you have reached the first milestone of this part: a simple website at an address you own.
Set up email so your messages reach the inbox
Email has a weakness: anyone can type any address into the From field of a message. To protect people from fake messages, email providers such as Gmail, Outlook, and Yahoo check where a message really came from before they deliver it. They look up the DNS records of the domain name in the From address. If those records do not show that the sender is allowed to send for that domain, the provider puts the message in the spam folder or rejects it.
That is why the email service would not send for the club. The club had no domain name, so providers had no records to check.
An email service is a company that sends messages for your website or app, such as sign-up confirmations, receipts, and sign-in links. When you add your domain name to the email service, it shows you DNS records to add at your registrar. Email providers use those records to run three checks:
The provider finds each answer in a DNS record that you add. If the records are missing, a real message from your site is treated the same as a fake one.
- SPF. An SPF record lists the services that are allowed to send email for your domain. The provider checks that the message came from one of them.
- DKIM. Your email service adds a signature to every message it sends for you, a code that only it can produce. The provider uses a DKIM record in your DNS to confirm that the signature is real, which shows that the message came from your domain and was not changed on the way.
- DMARC. A DMARC record says what you want providers to do with a message that fails both of those checks: deliver it anyway, put it in the spam folder, or reject it. It also gives providers an address where they can send you reports about messages that failed.
Your email service gives you the SPF and DKIM records. You add the DMARC record yourself, and the agent can write it for you. Add all three before you send anything. Since February 2024, Gmail has required SPF or DKIM from every sender, and it requires all three from anyone who sends about 5,000 or more messages a day to Gmail addresses. Yahoo and Outlook have similar rules for senders of that size.
Set up these addresses now:
- An address your site sends from, such as hello@runclub.example. It has to be at your own domain name. You cannot use a free address such as one ending in gmail.com, because an email service only sends for a domain whose DNS records you can edit.
- An address people can write to, such as help@runclub.example. Many registrars can forward email sent to your domain to the inbox you already use. Later in the course you put this address on the site so that members can ask for help.
An email provider delivers your message to the inbox only if the DNS records for your domain name show that the message really came from you. You add three records for this: SPF, DKIM, and DMARC.
The obvious objection: the free link already works
The free link does work, and it is fine to use while you are still building. Once other people use the site, the free link causes these problems:
- It is hard to say and hard to type. A member can remember runclub.example after hearing it once. A link that ends in random letters has to be spelled out every time.
- You cannot send email from it. Without your own domain name, the email service only sends test messages to you.
- It belongs to your host. If you move the site to a different host, the free link stops working, and so does every copy of it that people have saved or printed. If you have your own domain name, you change one DNS record and your address stays the same.
A domain name costs one or two dollars a month.
What happens when a domain name stops working
On April 16, 2025, people around the world could not start or join Zoom meetings for almost two hours. Zoom's own computers were working normally the whole time. The problem was Zoom's domain name, zoom.us. The company that manages every domain name ending in .us had switched zoom.us off by mistake, after a miscommunication with Zoom's registrar. While it was switched off, browsers and the Zoom app could not get an IP address for zoom.us from DNS, so they could not reach Zoom's computers at all.
A small site can lose its domain name for a simpler reason: the yearly fee does not get paid, for example because the card on file has expired. When a domain name expires, the registrar switches off the site and the email at the same time. For a few weeks (the exact length depends on the registrar) you can still renew at the normal price. After that you have 30 days to get the domain name back by paying an extra fee, and then anyone can buy it.
What you can do now
You can buy a domain name in your own account, explain what each of the four types of DNS record is for, connect a domain name to your site, and set up email that reaches the inbox. If your site or your email stops working right after a change, check the DNS records first, before you ask the agent to change any code.
Try it now
This drill takes about twenty minutes, and the first path costs nothing. On the second path you pay for a domain name for one year, which is the first time this course asks you to spend money.
No setup: Choose a website you use every day and look up its DNS records with a free lookup tool, such as Dig in the Google Admin Toolbox, or MXToolbox. Type in the site's domain name and look up its A record, then its MX records, then its TXT records. One of the TXT records starts with v=spf1. That is the site's SPF record, and it lists the services allowed to send email for that domain. Then look up the TXT records for the same domain name with _dmarc. typed in front of it, for example _dmarc.example.com. That record shows what the site wants email providers to do with messages that fail the checks.
With your tools: On a registrar's website, search for the domain name you want and check its yearly renewal price. Buy it yourself, in your own account, with automatic renewal turned on. Then open Claude Code in the running-club folder, or in your own project, and type: "Add my domain name to this project on the host, and list the exact DNS records I need to add at my registrar." Add the records at your registrar. When the host's Domains page shows that the domain name is connected, open your site at its new address. For email, type: "Set up an email service so this site can send from hello@ at my domain name. List the DNS records I need to add, and send me one test message when they are working." Codex and Cursor accept the same requests in their chat panels. If nothing is installed yet, The Setup Clinic covers the install.
Either way, finish by adding these lines to the idea file. If you took the first path, write them for the site you looked up, using what its records showed you.
Domain: runclub.example, bought in my own account
Renews: every March, automatic renewal on
Records: A and CNAME for the site;
SPF, DKIM, and DMARC for email
Email: the site sends from hello@;
help@ forwards to my inbox
Chapter Summary
- A domain name is the address people type to open your site. You pay a registrar a yearly fee for it, and it is yours for as long as you keep paying.
- Buy the domain name yourself, in your own registrar account, with automatic renewal on, and check the renewal price before you pick a registrar.
- DNS is a public directory that stores the IP address for each domain name. A browser uses it to find the computer that runs your site.
- A new site needs four types of DNS record: an A record and a CNAME record for the site, an MX record for receiving email, and TXT records for the email checks.
- To connect a domain name to your site, add it on the host's Domains page, add the records the host shows you at your registrar, and wait for the change to take effect, which can take from a few minutes to a day or two.
- The host gets the certificate that turns on HTTPS and renews it automatically.
- Email providers check SPF, DKIM, and DMARC records before they deliver a message to the inbox, so your site has to send from an address at your own domain name.
- If your domain name expires, your site and your email stop working at the same time, so keep it in your own account with automatic renewal on.
- Your artifact is the idea file, which now has four lines about your domain name: where you bought it, when it renews, which records it has, and which addresses send and receive email.
- The next chapter is Add accounts and member-only pages, where you add sign-in to the site.
Sources
- ICANN, Whois Accuracy Program Specification and its contact verification page, on confirming a registrant's email address within 15 days (last verified November 2026).
- ICANN, Expired Registration Recovery Policy and the domain name renewal and expiration FAQs (last verified November 2026).
- Cloudflare Learning Center pages on DNS records, on DMARC, DKIM, and SPF, and on what a domain name costs (last verified November 2026).
- Vercel documentation on adding a domain, managing DNS records, and SSL certificates (last verified November 2026).
- Google's email sender guidelines, Yahoo's sender best practices, and Microsoft's support article on error 550 5.7.515 for Outlook.com (last verified November 2026).
- Resend and Postmark documentation on verifying a sending domain (last verified November 2026).
- Zoom's incident report for April 16, 2025, "Issue with multiple Zoom Services", on its status site (last verified November 2026).
- Registrar pricing for .com names at Cloudflare, Porkbun, and Namecheap (last verified November 2026).