Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 bought a VPS a few days back and had a domain name registered. It gave me 2 nameservers.

I only have shell access (no Cpanel/WHM) and it's running CentOS 5. I can visit my site with http://IP/ but not with What changes do I need to make so that I can visit my site with I'm really new at this and any help would be greatly appreciated. Thanks.

share|improve this question

closed as off-topic by HopelessN00b, HBruijn Feb 24 at 19:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

You need to make sure that your domain name is using your two nameservers. You can do this by using a whois command (whois or using any number of websites (eg.

Then if your domain name is using the correct nameservers, you need to configure those nameservers to return your ip address for your domain. How you do that will depend on what software the nameservers are running and what access you have to them. You need to get them returning at least an A record for your domain name pointing to your ip address ( IN A

If your domain name isn't using the correct nameservers then you need to configure that at the place you registered your domain name.

Finally you'll need to configure your server to respond correctly to the domain name. This will involve setting up Apache (or whatever other web server you are running) to listen to requests for your domain. If you're only hosting one domain then you can get away with just using the default site, with your pages stored in /var/www. Otherwise you'll need to configure virtual hosts.

Then of course there's email too. Ubuntu systems have nice setup scripts for the default mail server to let you configure at least the basics. I don't know about Centos.

share|improve this answer
Hi, thanks for the detailed response. whois returns the correct name servers that were given to me. One of them is the same as my VPSs IP. So that means I'll just have to configure my VPS? Doing a 'dig' gives ;; QUESTION SECTION: ; IN A I have my pages in var/www/ and running Apache. I'm not sure what to do from here. – user41010 Apr 20 '10 at 18:36
OK, so you need to configure your nameserver which is easier and less scary than you'd think. See… for a start in configuring Bind on Centos. – kaerast Apr 20 '10 at 21:40

First you need to make sure that your domain name correctly resolves to the correct ip-address. Does something like "ping" show that you are connecting with the correct ip-address?

share|improve this answer
Nope, I just tried it. It says "Ping request could not find host..." I'm running 'named', I guess that needs to be configured somehow? Thanks. – user41010 Apr 20 '10 at 9:49
If you are on a linux system, does the command "dig" return the correct ip-address? What if you use "dig @givennameserver"? Normally, if you buy a VPS and register the domain name at the same company, they will add your domain name on their own DNS servers, and I guess that they gave you the ip-addresses of their own nameservers. With the dig command, you can specifically query your domain name on their name servers. – rvdginste Apr 20 '10 at 10:05
Thanks. Doesn't seem to make much sense with "dig": ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 It's from the shell of the VPS. Querying for dig returns dig: couldn't get address for '': failure. I don't have access to but the is the same as my VPS. – user41010 Apr 20 '10 at 18:45
Ok... then you'll need to configure your own nameserver, like kaerast mentioned. – rvdginste Apr 21 '10 at 8:57

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