Web Hosting at Home with Dynamic DNS


Web Hosting at Home with Dynamic DNS

What if you want to host your own website at home? Maybe because you don’t want to spend too much on hosting, or you can’t find a hosting plan that suits your needs. Or maybe you’re just OC about it? (And I don’t mean Optical Carriers).

Well, if you are like most home Internet users and connect using a modem, DSL line, or cable then you probably have a dynamic IP address. When you connect to the Internet, your ISP assigns you an IP address that is used only for the duration of that specific connection and when you log in again, you get a different IP address. (Although some DSL or cable ISPs will allow you to pay extra for a static or non-changing IP address).

So what if you have a dynamic IP?

Generally, a changing IP address does not affect a typical Internet user. It does however complicate website hosting at home. Why? Because running a web server using a dynamic IP will make it difficult for people to get to it since you can’t link your IP to your domain name.

So how exactly do you go around this problem?

That’s where a DDNS service/provider comes in. A DDNS is defined by Webopedia as a method of keeping a domain name linked to a changing or dynamic IP address.

A DDNS service is, therefore, a company that allows users anywhere on the Internet to find your website(s) despite a constantly changing IP address. For a small fee, it allows those who connect to the Internet using dynamic IP addresses to be able to use applications that require a static IP address1 by mapping a third-level domain name to an IP address that you choose, including dynip.com, dyndns.org, and dns2go.com. Your remote computers can then forward a new IP address to the DDNS whenever your ISP-assigned IP address changes.

This is what happens:

People type in your domain name on their browsers
The Internet connection finds a DNS
The DNS looks up your domain name in its database and
Request is forwarded to the proper IP address
yours if you have a static IP or
someone else’s static IP (in this case the DDNS provider’s) if you have a dynamic IP
DDNS service then forwards the page request to your current IP
Your PC receives the request
Your web server sends back the page to the client PC and browser
The DDNS server system can not only accommodate multiple host names for a single website, it also supports MX (mail exchange) records. The destination address of an MX record must however be a domain name and not simply an IP address.

Still with me? Good. Now how does DDNS keep track of all those IP address changes?

Enter a DDNS Client Program. These programs, usually provided by your DDNS service, will automatically update the address it is forwarding to. It constantly monitors your computer’s current IP number, keeps it up to date and notifies your DDNS service’s servers when your IP address changes. When a change is detected, the software automatically logs onto the DDNS service’s computer using your user name and password, and updates your listing to the new IP address.2

This process is discussed more thoroughly in the article ‘How to use dyndns.org to setup a DNS service to websites and to mail servers,’ by Joe Mehaffey.

Of course if you already have at least one static IP somewhere on the public network, you can create your own system instead, using a variety of Web scripting languages.

You could build a page that automatically learns a remote computer’s IP address, which could then redirect Web visitors from your static IP address to the dynamic one. Updating the record of your dynamic address would just be a matter of making a Web request, since each request your Web browser makes has your IP address bundled inside of it.