Name servers to use for a domain name when using a VPS server
Author: admin admin Reference Number: AA-00456 Views: 5328 Created: 2025-08-13 14:14 Last Updated: 2025-08-13 14:16 0 Rating/ Voters

Running a name server on your own VPS server can be complicated, and error prone.

Therefor we recommend on a VPS server to use cloudflare as the DNS provider. 


Step 1: Create a Free Cloudflare Account

Visit Cloudflare

Go to https://www.cloudflare.com
Click "Sign Up" in the top right corner


Complete Registration

Enter your email address and create a strong password
Verify your email address through the confirmation link sent to your inbox
Log in to your new Cloudflare account
=======================================================

Step 2: Add Your Domain (Create a Zone)

Add Site

From the Cloudflare dashboard, click "Add a Site"
Enter your domain name (e.g., example.com)
Click "Add Site"


Select Plan

Choose the "Free" plan (this provides all basic features)
Click "Continue"


DNS Record Scan

Cloudflare will automatically scan for existing DNS records
Review the detected records
Click "Continue"

=======================================================

Step 3: Configure DNS Records for Your VPS

Add A Records

In the DNS management section, add the following records:

Type: A
Name: @ (or your domain)
Content: [Your VPS IP Address]
TTL: Auto
Proxy Status: Proxied (orange cloud)
Type: A
Name: www
Content: [Your VPS IP Address]
TTL: Auto
Proxy Status: Proxied (orange cloud)

Add Additional Subdomains (Optional)

For subdomains like api.yourdomain.com or blog.yourdomain.com:

Type: A
Name: [subdomain name]
Content: [Your VPS IP Address]
TTL: Auto
Proxy Status: Proxied or DNS-only (grey cloud)

Proxy Status Explained

Proxied (Orange Cloud): Traffic routes through Cloudflare for security and performance
DNS-only (Grey Cloud): Direct connection to your server, bypassing Cloudflare proxy


=======================================================


Step 4: Update Nameservers at Your Domain Registrar

Get Cloudflare Nameservers

Cloudflare will provide you with two nameservers, typically:

name1.cloudflare.com
name2.cloudflare.com

Copy these nameservers


Update at Your Registrar

Log in to your domain registrar (Ifastnet, GoDaddy, Namecheap, etc.)
Navigate to DNS settings or Nameserver settings
Replace existing nameservers with Cloudflare's nameservers
Save changes


Propagation Time

DNS changes can take up to 24-48 hours to fully propagate
You can check status using tools like dig or online DNS checkers

=======================================================

Step 5: Verify Configuration

Check Nameserver Status

Return to Cloudflare dashboard
Wait for the status to change from "Pending" to "Active"
This confirms nameservers are properly configured


Quick Jump Menu