Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a domain registered externally from where I have my VPS, but I need to connect these two in order to have the domain forward to my host. I know that I have to take my host's nameservers and replace them at my Domain Registrar's website.

The question is: Where do I get my nameservers?...

I've read about /etc/resolv.conf and I actually added my nameservers there like this:


The IPs are actually like that, I didn't know with what to replace them.

So how do I set up my nameservers correctly and have the domain point to my host?

P.S: I'm using Webmin to manage my VPS.

share|improve this question

Your assumption that you have to take your host's nameservers and replace them at your Domain Registrar's website is not quite what you need to do.

First: You do not need to change the /etc/resolv.conf file on your host. That is the configuration file your host uses to resolve all internet domains/hostnames, not just your own. The ip-addresses and are public DNS servers provided by Google and suitable for most configurations. The configuration should look like:

# /etc/resolv.conf

Changing nameserver records is what you do when you run your own nameserver. Normally you do not need to run your own nameservers and you shouldn't try before improving your understanding of DNS.

I think that what you probably want to achieve is that people using for instance www.yourdomain.com end up at your VPS and e-mail addressed to <someone>@yourdomain.com also gets delivered to the mailserver you run on your host.

That is mostly updating the DNS records for www.yourdomain.com ftp.yourdomain.com etc. Typically your registrar provides a management console where you can do that yourself and your domain uses the nameservers from the registrar.

In that management console you enter the ip-address of your VPS as the A-record for www.yourdomain.com and for all other DNS names you might want to use.

share|improve this answer
I'm aware of DNS records, but my host doesn't provide them since I'm not hosting my websites there. I had this feature available in the past, but now that I'm not continuing with their host, they removed this functionality and advised me to start using nameservers. And yes, you exactly described what I need, but I have to find an alternative way to achieve this without DNS Records setup at my Registrar. – Aborted Dec 4 '13 at 16:07
Then transfer the domain to a registrar that does allow you to manage your domain... – HBruijn Dec 4 '13 at 16:09
The direction of this question is changing a little, but where do you recommend to transfer? – Aborted Dec 4 '13 at 16:10
The first five results for searching on domain registration all include managing DNS records in their most basic product offering. – HBruijn Dec 4 '13 at 16:20
I would still like to continue solving this issue without transferring. I'd really appreciate some help with the nameservers. – Aborted Dec 4 '13 at 18:59

The correct syntax for /etc/resolv.conf is "nameserver $IP_ADDRESS", like, if you use Google's DNS, "nameserver". If you want to locally resolve ns1.mywebsite.org to a certain IP, edit /etc/hosts.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.