I want to start hosting my website at my own computer as well websites of my friends too (say mini hosting platform). I learned Debian, Bind9 and Apache for this purpose.

On my system everything is going well. Even my IP opens up my website from outside my network. But my domain (say, abx.com) does not show my website.

How can I set things up so that abx.com points to my website?


Your domain's DNS (A record) has to point to your hosting IP. In your local environment this may look as though it is working, but externally it may not. This is due to the nature of DNS, which is hierarchical. Given your example of abx.com, if I were to request that domain the resolver (the system that does the work of converting abx.com to a network IP nn.nn.nn.nn), the following takes place.

The resolver looks at your settings as to where to look for DNS. On windows this setting is in your network properties, and is usually retrieved from DHCP. On unix systems this is fetched from a combination of nsswitch.conf and if that contains a dns setting for the hosts entry, /etc/resolv.conf will be used to to look for nameserver statements. Given that nsswitch.conf is correct, and resolv.conf contains nameserver entries, it will then talk to the nameservers in the order they are listed in the file.

The nameservers, if configured with a cache, will check if they have stored a local entry for the request and if they have, return that result. If they do not have an entry they then do the work of searching this hierarchy of DNS.

In the example of abx.com. there are actually three parts to this domain, ., com and abx. The . is known as the root node and most DNS will not show it, however it fundamental to how DNS works. (Try doing a host or nslookup on www.google.co.uk. (note the trailing dot) and note that is resolves just as well as www.google.co.uk. The same goes for putting the dot at the end of an address in the location bar in your internet browser. The root node is actually a distrubuted network of nameservers, spread across many countries, hosted by many organizations and companies.

Going back to your resolver, it will have hints of where the root node name servers are. It will then go and ask one of root name servers as to which nameservers serve the com part of the DNS query. You can emulate this step with host -t ns com or nslookup -q=ns com. The nameserver will then use a forumla to pick one of the nameservers listed there and use it to ask for the abx.com domain.

At this point we reach a mechanism called delegation the com nameservers delegate the responsibility of abx.com to other nameservers, these are done by NS records. But those records contain domain names not IP addresses. The way these domains are affixed to one another is through glue records, so given abx.com as an example it would be something along the lines of:

 abx   IN    NS   ns1.abx.com
       IN    NS   ns2.abx.com
 ns1.abx.com IN A
 ns2.abx.com IN A

Your resolver would be given these A records, as additional info, in its request for the NS records of abx.com from the com nameservers. Your resolver then asks ns1.abx.com or ns2.abx.com for the A record for abx.com, and this returns the IP that in turn passes to the browser/process requesting that DNS record.

It's normally this last stage of delegation that is broken with most home user setups. They have gone through the process of buying a domain with a registrar/service provider, but have then failed to configure the domain to point the delegation to their own name servers. You actually have to tell the registrar where your nameservers are before they can put glue records in place to get your step of the delegation to work.

One that step has been done, the last part of the recursion used by the resolver slots into place. This is all provided that your abx.com zone is configured correctly, is being served to the internet at large and is not firewalled by either you or your hosting provider.

There are a plethora of DNS tool websites on the internet that will allow you to see what state your domain is in. (Such as DNS Stuff's DNS tools). I also suggest you familiarize yourself with the dig tool which will allow you to specifically query specific name servers (and records) and get more detailed responses in the output.

TLDR Check your configuration with the hosting provider and make sure you have pointed the domains NS records at your nameservers IPs. Make sure you have no firewall blocking connections, your BIND is running and it is serving the correct DNS. Check the external DNS with external tools to check the state of your DNS.


When people ask this I always tell them:

Let somebody else host your DNS

Seriously. You don't have the network stability that professionals have and for DNS stability is key to a happy life. It's not weakness to admit that somebody else is better at it than you can be. They have something you don't: epic redundancy.

Most registrars offer a free load-balanced and redundant nameserver service, split over multiple servers in multiple locations. Same goes for web hosts and there are even free services out there that are pretty decent.

  • 1
    thank you for your advice. but where did they get such features from. Over a period of time a long struggle and honesty of conduct was all that made them grow into giants as you see them now, but one day they were as little as an ant, which am i today. tomorrow can transform me into a learned man. SO AM I ASKING. I KNOW THAT THERE EVEN STARS THERE, BUT JUST BECAUSE THERE ARE STARS I CAN NOT STOP MY FEET ... need i ??? – Nishan Aug 10 '13 at 9:38
  • I've hosted my own DNS for years and never had any major issues (provided you have a minimum of two DNS servers, on two different networks with fairly guaranteed network connectivity and uptime, that is all that is required). – Drav Sloan Aug 10 '13 at 11:01
  • @Nishan By that logic, break out the soldering gun and let's build a server from scratch. – Oli Aug 10 '13 at 12:07
  • 2
    @Nishan If you want to experiment with DNS, do it first for an internal network. @Oli Why stop at assembling parts? Make your own chips! Or is using existing silicon unacceptable? Make your own universe! – Gilles Aug 10 '13 at 12:38
  • @Oli, with due respect I would say even the Debian is not build that way... We all have our levels and we all start from that level and with the good help we achieve one level up and finally the top becomes smaller before us. Information is for development not scaring someone Than you. – Nishan Aug 10 '13 at 14:31

Go register a domain name for your site which will be visible to the world. Register for DNS (Domain Naming Service). The registrar will bind your IP address to the site name; this service will be paid.

  • This question had an accepted answer over 2 years ago. Your answer does not answer the question or even add anything useful - the OP already had their own domain. – cas May 16 '16 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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