Choorai
Cycle 1

Domain and DNS Basics

Learn how to use a domain like myapp.com instead of an IP address like 192.168.1.1.

What you'll learn in this Cycle

  • Understanding URL structure
  • DNS record types (A, CNAME, TXT)
  • Comparing domain registrars
  • Connecting a domain with Cloudflare

What is a Domain?

A domain is a human-readable name attached to an IP address.

IP Address (hard)

142.250.207.14

Hard to remember, changes when servers change

Domain (easy)

google.com

Easy to remember, stays the same even if IP changes

URL Structure Breakdown

https://api.myapp.com:8080/users?page=1
https:// Protocol
api Subdomain
myapp Domain
com TLD
:8080 Port
/users Path

Beginner practical checklist

  1. Choose a purchased domain or a free subdomain first.
  2. Add DNS records in Cloudflare.
  3. Propagation may take from minutes to hours.
  4. If it fails, verify DNS value, proxy setting, and cache in order.

DNS Record Types

DNS (Domain Name System) is a system that translates domains into IP addresses. There are several types of records:

A

Address Record

Maps a domain to an IPv4 address.

Example
myapp.com → 192.168.1.1
CNAME

Canonical Name

Maps a domain to another domain (alias).

Example
www.myapp.com → myapp.com
api.myapp.com → myapp.pages.dev
TXT

Text Record

Stores text information. Mainly used for domain ownership verification.

Example
_verification.myapp.com → "google-site-verification=abc123"

Comparing Domain Registrars

Free domains?

Cloudflare Pages, Vercel, Netlify, and others provide free subdomains. Example: myapp.pages.dev This is sufficient when you are just getting started.

Hands-on: Connecting a Domain with Cloudflare

1. Change Nameservers

Change the nameservers at your domain registrar to Cloudflare.

Nameserver Settings
# Cloudflare nameserver example
ns1.cloudflare.com
ns2.cloudflare.com

2. Add DNS Records

Add DNS records in the Cloudflare dashboard.

Type Name Value
CNAME @ myapp.pages.dev
CNAME www myapp.pages.dev

3. SSL/TLS Configuration

Set SSL/TLS encryption to "Full (strict)" in Cloudflare. HTTPS will be automatically enabled.

Next Steps

If your domain setup is complete, let's deploy a frontend app next. In Cycle 2: Frontend Deployment, you will learn how to deploy a React app to Cloudflare Pages.

Last updated: February 22, 2026 · Version: v0.0.1

Send Feedback

Opens a new issue page with your message.

Open GitHub Issue