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?
How to host a website on personal computer
networking;dns;webserver;bind
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 10.10.10.10 ns2.abx.com IN A 10.11.11.11Your 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.