Adding a subdomain in Cloudflare allows you to create separate web addresses (like blog.example.com
or shop.example.com
) under your main domain. This is useful for organising services, creating microsites, or pointing to different servers. Follow these steps to add a subdomain in Cloudflare DNS settings:
Step 1: Log in to Your Cloudflare Account
-
Visit Cloudflare Dashboard.
-
Select the domain you want to add a subdomain to.
Step 2: Go to DNS Settings
-
In the left-hand menu, click DNS.
-
You will see a list of your current DNS records.
Step 3: Add a New Record
-
Click the + Add Record button.
-
Choose A record:
-
A Record: Points your subdomain directly to an IP address.
-
-
In the Name field, enter your subdomain prefix (e.g., type
blog
to createblog.example.com
). -
In the IPv4 address or Target field, enter the destination IP or hostname.
-
Set Proxy status to Proxied (orange cloud) if you want Cloudflare protection and caching, or DNS only (gray cloud) if you only need DNS resolution.
Step 4: Save the Record
-
Click Save to apply the new subdomain record.
-
It may take a few minutes for DNS changes to propagate globally.
Step 5: Verify the Subdomain
-
Visit your new subdomain in a browser (e.g.,
blog.example.com
). -
Use tools like dnschecker.org to confirm the DNS record is active worldwide.