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've bought an domain name on, and I'm trying to setup an Website on my own server. I got apache2 running and if I go to my home address ( it works, but now I am trying to link it to the adress: and I can't really figure out how to do that.

I think it doesn't work because has a default nameserver, but I can't change that one to

I thought I should do it with BIND so I followed some tutorials but it still doesn't work. When I use nslookup in BIND I get the following result, how do I fix this?

By the way I am using Ubuntu Server 12.10 with BIND 9 and Apache 2.2!


Non-Authoritative answer:

I have editted on the DNS Record to this:

Record Type: A Record Host: Record Answer: TTL: 300

Then I've forwarded port 80 to, but it still doesn't works!

share|improve this question

closed as not constructive by cjc, Sven, John Gardeniers, HopelessN00b, mdpc Nov 13 '12 at 17:55

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

There are two problems with your approach.

Local Network and NAT

As your IP suggests you are in a private network behind a router.

You have to think of it like this: To counteract the limited number of IPv4 adresses you get normaly ONE public IP for your private internet connetion provided by your internet provider. To use this connection with more than one person you need a router device. This creates a local network with IP addresses that are only avalable withing your home network (the PCs that ar econnected to the router). If your surf the web the router translates your local adress to your public adress and you can surf. This is called Network Address Translation (NAT).

The problem is that I cannot reach your computer under from here. I can only reach your public address. To make it possible for me to reach you, you need to setup port forwarding for port 80 to you local address (


It is very likely that your public IP changes every 24 hours. Therefore you would have to change your DNS settings every time you get new IP.

DNS Settings

You need to understand the Domain Name System.

Small overview: You send a DNS Query ( and the nameservers resolve your domain hierarchicaly. The DNS records (the information dnsserver needs to prcess your query) you need, to map a name to an IP, is called an "A record".

And keep in mind: Changes might take time. It might take days. It depends on the settings of your DNS


Setup port forwarding for port 80 on your router and set an A record for your public IP.

share|improve this answer
Well on my router I did this: on Port Range Forwarding port 80-80, protocol TCP & UDP, IP: But how do I set an A record for my public IP? Oh and my public IP is static so I don't have to change the DNS I think. – tversteeg Aug 8 '12 at 14:38
Just look through your settings at and find where you set records. The web interfaces differ between these services. You don't need to mess around with setting up your own nameserver if you just want a domain to point to your IP – Christopher Perrin Aug 8 '12 at 14:45
I just did that, but when I go to, there is a very strange website. And it is not directing to my server, although I did exactly what you said. But as you posted maybe I must wait, so I will check if it works tomorrow, thanks for your help anyway! – tversteeg Aug 8 '12 at 14:47 points to Is that your IP? – Christopher Perrin Aug 8 '12 at 14:50
No my IP is – tversteeg Aug 8 '12 at 14:52

You need to set up some DNS records for your domain. Just setting up BIND yourself isn't going to do anything at order to publish a name to DNS:

  • you need DNS servers, and
  • you need to update your domain registration to point to those nameservers

Typically, most domain registrars (like provide you with DNS nameservers and a web interface for updating your domain records. It is generally much easier to use the nameservers made available by your registrar rather than setting up your own. has a number of documents that focus on domain name management.

If you really want to run your own nameserver, rather than using the ones provided by, take a look at this document...but I recommend you just use the nameservers.

share|improve this answer
Well I followed this tutorial to setup a DNS server… but that doesn't work, and the files on only point to things you can do inside the account, but I don't know how to use the information of that. – tversteeg Aug 8 '12 at 14:24
I've udpated the second link to something more appropriate...which was in the same section of the knowledgebase. The tutorial you followed tells you how to set up a DNS server, which is correct as far as it goes. Once you have a DNS server set up, you need to take the additional steps to tell the world about it. I think you'll find that the documentation available on is more than sufficient. – larsks Aug 8 '12 at 14:30
I can't change the nameserver to, so I don't know what I should change it to.. – tversteeg Aug 8 '12 at 14:33

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