A subdomain is just a DNS record. This guide walks through creating one in Cloudflare: add an A record, point the subdomain at your server IP, save, and verify. The same steps apply in other DNS control panels.
A subdomain is just an A record
Creating a subdomain does not require registering a new domain or building a new site. An address like blog.example.com or app.example.com is simply an A record in your main domain’s DNS that points the subdomain at a server’s IP address. Once DNS propagates, visiting the subdomain reaches that server.
The steps below use Cloudflare as the example. Every other DNS control panel works the same way; only the menu location and field names differ.
Two things to confirm before you start
- Your domain is hosted on Cloudflare. If it is not, see why developers prefer it here: Why experienced developers prefer hosting DNS on Cloudflare.
- You know the server IP (IPv4 address) the subdomain should point to. If you just bought a VPS, for example from Hostinger, the server IP is shown in its control panel.
Step 1: Open the DNS management page
Log in to the Cloudflare dashboard, select your domain, open DNS in the left menu, and click the Records tab. This page lists all current DNS records.
Step 2: Add an A record
Click Add record and fill in the form as follows:
| Field | Value |
|---|---|
| Type | A |
| Name | The subdomain name, e.g. blog, which maps to blog.example.com |
| IPv4 address | The server IP, e.g. 123.45.67.89 |
| Proxy status | DNS only or Proxied, depending on whether you want Cloudflare’s CDN in front |
| TTL | Auto |
Enter only the subdomain part in the Name field, not the full domain. To create blog.example.com, put blog in Name and Cloudflare appends the domain automatically. If you type example.com or leave it empty, you are editing the apex record instead of creating a subdomain. Easy to confuse, so double-check before saving.
Step 3: Save and wait for propagation
Click Save. DNS changes typically take from seconds to a few minutes, depending on the TTL. New records usually resolve quickly; edited records wait for the old TTL to expire. The relationship between TTL and propagation time is covered here: Why lower your DNS TTL to 300 before a migration?
After saving, verify with dig:
dig blog.example.comIf the output shows the server IP you entered, the record is live.
The same steps apply in other DNS control panels
NameSilo, Namecheap, GoDaddy, and Chinese registrars like Aliyun and Tencent Cloud all follow the same pattern: add an A record, put the subdomain in the name field, and put the server IP in the value or points-to field. Only the labels differ. Namecheap calls the field Host, Aliyun and Tencent Cloud call it 主机记录 (host record). If you want a visual walkthrough, this guide covers all three registrars: How to register a domain and set up DNS on NameSilo, Namecheap, and GoDaddy.
Full workflow recap
Creating a subdomain in four steps
Confirm the details
Domain hosted, server IP ready.
Open DNS records
Pick the domain, open Records.
Add the A record
Subdomain name, server IP, save.
Verify it resolves
dig the subdomain, check the IP.
Related reading
- Why experienced developers prefer hosting DNS on Cloudflare
- Why lower your DNS TTL to 300 before a migration?
- How to register a domain and set up DNS on NameSilo, Namecheap, and GoDaddy
every Thursday.
Hosting reviews, builder comparisons, performance tips, and plugin picks — curated weekly for WordPress site owners and builders.