Hostxpeed
Login Get Started →
Getting Started

How to Set Custom DNS

3 min read
22 views
Jun 11, 2026

Prerequisites

Before setting custom DNS, make sure you have:

  • SSH access to your VPS
  • Root or sudo privileges

Method 1: Using resolv.conf (Traditional)

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
sudo nano /etc/resolv.conf

Add or modify:

nameserver 1.1.1.1
nameserver 1.0.0.1

Popular DNS Servers

Cloudflare:

  • 1.1.1.1
  • 1.0.0.1

Google:

  • 8.8.8.8
  • 8.8.4.4

Quad9:

  • 9.9.9.9
  • 149.112.112.112

Make Permanent (Prevent Overwrite)

sudo chattr +i /etc/resolv.conf

✅ Custom DNS servers have been configured.

Was this article helpful?