Hosting a Website on Your Own Webserver

Wednesday, January 18, 2012

So, by now you have probably registered a domain name and decided on how and where you were going to host your DNS records. If not, take a step back and get that resolved before moving forward. If that has been completed, you may be wondering how hard can it be to host your website yourself. These days, it is challenging to come up with a business case to justify the need to host our website on our own webserver, simply because of the financial aspects. However, for some situations, it might make more sense to do it ourselves, at least initially. For example, if you are starting a new business or just simply learning about web hosting. You may not be sure exactly what you want to implement in a website, so signing a contract with a hosting company may not make sense at the moment. Hosting the site yourself will allow you to save money that you can use to grow your business, or at the very minimum, explore website options before you are ready to go live in production. Once your website starts growing with regard to visits and you need more features and performance, you may find it necessary to pay a web hosting company to host it for you.

If you are ready to proceed, you'll need the following requirements to be implemented

  1. You'll need a computer running a network operating system such as Windows or Linux. The server should be plugged into the network using at least an Ethernet card. Wireless connections for a webserver are not generally reliable and are much slower than wired connections.
  2. A high speed internet connection that is available 24 hours a day, 7 days a week to ensure that your website will be available to Internet users at any time.
  3. Install the web server role on your operating system. If you are running a Windows Server, you can install IIS. If you prefer not to use IIS for web services, you can download a 3rd party web server application such as Apache HTTP Server. Their web server is free to download.
  4. Once you have the web server installed, you must configure it. Generally, a default installation does not require much modification for a simple website. However, a web server running multiple sites will require additional IP addresses or host headers for the sites to work properly.
  5. Create a DNS host record in your domain's authoritative zone, such as 'www', and point it to the public IP address of the webserver.
  6. If you are hosting your site on a web server located on your internal network, you will need to configure your Internet router to forward traffic that it receives on port 80 (you mapped the DNS host name to the public IP which is your Internet router's external IP address if the web server sits on your private network).
  7. If you have a dynamic IP assigned to you by your Internet service provider, you'll need to take an additional step. Check to see if your Internet router supports "DynDNS". If so, you can configure your router to point to your DNS hosting site so that your public IP address will update your 'www' record every time your public IP address changes. If you do not update your 'www' record, Internet users will not be able to access your site when your IP changes. The DNS record needs to be in "sync" with your public IP address. If possible, ask your Internet provider to provide you with a static IP address, instead of a dynamic one. If your router does not support DynDNS, you could install a small program on your web server that routinely checks its public IP address and updates the DNS record accordingly.
  8. Take the necessary steps to secure your server. Make sure that you are running malware protection and keep up with the latest operating system updates. While there is only one of you to protect the server, there are thousands of malicious users out there looking for web servers that are vulnerable. Best Practices for Server Management

Again, hosting your web server in this manner will get your site up and running. As your site grows and requirements change, you may need to consider hosting your site on multiple servers, adding redundance to your network, and increasing server performance. As new requirements surface you'll need to evaluate when hosting your site with a web hosting provider makes sense for you.

Did you find the page informational and useful? Share it using one of your favorite social sites.

Recommended Books & Training Resources

How to Host Your Own Web Server Internet World Wide Web: How to Program