Add DNS Records to Cloudflare
How to Add DNS Records to Cloudflare
Introduction
Adding DNS records to Cloudflare is essential for managing your domain’s traffic and ensuring proper email, web traffic, and other service routing. This guide will walk you through adding DNS records to your Cloudflare account.
Prerequisites
- Cloudflare Account: Ensure you have a Cloudflare account. If you don’t have one, sign up at Cloudflare’s website.
- Domain: Your domain should be added and active in your Cloudflare account.
Step-by-Step Guide
Log in to Cloudflare
- Access Cloudflare
- Open your web browser and go to Cloudflare’s login page.
- Enter Credentials:
- Input your email address and password, then click Log In.
Select Your Domain
Access the Websites Tab:
- Once logged in, you will be directed to the Cloudflare dashboard. Look for the Websites tab in the right-hand panel.
Choose Your Domain:
- Under the Websites tab, locate and click on the domain for which you want to add DNS records. This action will open the domain’s settings.
Obtain DNS Records
Before adding records to Cloudflare, you need to obtain the necessary DNS record details.
Here’s how you can get these records:
Log in to Your Service Provider
- Access the platform or service that provides the DNS records you need.
Locate the DNS Records Section:
- Navigate to the section of the platform where DNS records are listed or configured. This section typically provides the necessary details for MX, TXT, CNAME, and other records.
Copy the DNS records:
📝Note or copy the required details, such as:
- A records: IPv4 addresses.
- AAAA Records: IPv6 addresses.
- CNAME Records: Canonical names or aliases.
- MX Records: Mail server addresses and priorities.
- TXT Records: text values for verification or SPF.
Access DNS Settings
Go to DNS Tab:
- In the domain’s settings menu, click on the DNS tab. This will bring up the DNS management interface.
On the DNS management page, click the Add Record button. This will open a form to enter new DNS record details.
Select Record Type
Choose the type of DNS record you want to add from the drop-down menu.
Common types include:
- A: Points a domain to an IPv4 address.
- AAAA: Points a domain to an IPv6 address.
- CNAME: Points a domain to another domain name.
- MX: specifies mail exchange servers.
- TXT: Adds text information to the DNS records.
- SRV: specifies services provided by the domain.
Enter Record Details:
Name: The subdomain or the main domain for the record (e.g., www
, mail
, or @
for the root domain).
Value: The destination or IP address for the record (e.g., 192.0.2.1
for an A record).
TTL: Time to Live. Select a default or custom value. "Auto" is typically recommended.
Priority (for MX and SRV records): Enter a priority number if applicable (lower numbers indicate higher priority).
Save the Record:
- Click the Save button to add each record to your DNS settings.
Verify the Record
Check DNS Records:
- Verify that your newly added record appears in the list of DNS records. It may take some time for changes to propagate.
Use DNS Lookup Tools:
- Use tools like DNS Checker or command-line utilities like
nslookup
to confirm that the record is resolving correctly.
Review and Finalize
Review All Records:
- Double-check the DNS records you’ve added to ensure they are correct and complete.
Update or Remove Records If necessary.
- If you need to make changes, you can edit or delete records by selecting the appropriate action from the DNS management interface.