Host Your Own Domain and Webserver

This article is from 2006!  The information here may not be the most current.  You can visit an updated version here!

Doesn’t sound like anything new right?  Well, some people may not know of this method.

Normally, to host your own webpage you would need to spend around 7 bucks to purchase a domain.  Next you would need a hosting plan that usually runs around 3-15 dollars per month to serve up your web pages.

What most don’t realize is that you can skip these steps all together…you don’t need to get dedicated Windows or Linux Hosting (this blog is hosted on dedicated hosting…but started out in my apartment!) to serve pages up to your friends and family.  You absolutely do not need to get domain name services through a provider.  You can even host your own webserver using a dialup connection (that’s right…I said dialup) although. I don’t recommend it (but I’ve done it using 56.6kbps).

Why would you want to do this?  My reply…to stay connected to friends and family…perhaps throw up a gallery so that your grandparents can see pics of your new dog/car/tinfoil hat.  Sure, you could waste my time with MyWaste..er..space and be barraged daily by advertisers and solicitors…or you could roll your own web host, install a gallery or website, and provide media to your friends and family without costing yourself a dime.  That’s right, NO COST (except time spent getting it running).  Just remember, your website might not survive a digging or slashdotting if you run it yourself.  Keep that in mind 🙂  So without more chatter, let’s get to the meat and potatoes of things:

Do you cringe at the thought of buying a domain and putting up with the headache of trying to make sure your IP address is up to date with your domain?  Do you hate the 40 dollars you spend on DNS service each year to resolve your IP address to your hostname?  Read on and learn the the flat-broke-and-busted way of maintaining a fixed hostname for your IP…even if you have dialup.

I’ll divide this up into 2 sections.  The first will deal with Linux.  The second, Windows.  This is only something that I’ve found easy to do and the price is just right (it’s free).  The only thing that I recommend is a dedicated internet connection (cable, DSL) but even this is not necessary as dialup can be used.  I recommend that you use the Linux way of doing things since it is more secure and doesn’t require a restart every time you patch it.

*note: I’m assuming that you aren’t behind a firewall/proxy of any kind and that your ISP doesn’t block port 80 traffic.  If your ISP blocks port 80, see the appendix at the end of this article.

LINUX

No matter what version of Linux you run, chances are that you’ll be able to install the apache webserver.  This is good news as over half the websites of the world are run by the extremely efficient and speedy apache. I’m not going to address the specifics of how to set up your website…only how to get it a fixed address without buying a domain.  So, you have your pages dropped into your webservers public directory…good.  Now, how to resolve your IP…lets say it is…25.24.4.166 (for our example) and you want it to have a host.name.com to bind to.  Easy to resolve.  Go to http://www.no-ip.com/index.php and sign up.  You can get a site from noip that is like yourname.theirdomain.com/.net/.info.  They have cool names like sytes.net and servebeer.org…even workisboring.com

You’ll be able to choose your own top level name…for instance, Ithink.dnsiskinky.com could be your new domain name.  Next download a client from the download tab: https://www.no-ip.com/downloads.php

The linux client is a tar.gz source and is simple to install. Follow the instructions when installing.  You may have to install compilation tools (devel packages like GCC) to install the client.  You now are the proud owner of yoursite.theirsite.com and your IP will ALWAYS update (as long as noip.com is up) each time you log on/sign on/beam up or whatever it is you do.

How does this help you?  Well, if you’re like me, you have a dynamic IP address.  If you connect to the internet via cable, dialup, or dsl…you also have a dynamic IP address.  Dynamic means that it will change from time to time without warning.  So by binding yoursite.theirsite.com to your IP address…you don’t ever have to worry about what IP address you have anymore.  Instead, you’ll always be able to connect using yoursite.theirsite.com.  You can host a webserver using Apache and a virtual host (also known as a Virtual Private server or VPS Hosting) in this style as well (look for another how-to on this subject later) so that everyone can visit a shiny website at yoursite.theirsite.com.

WINDOWS

First you need a free and clear webserver since one is not included by default with windows. You can download Apache for this as well OR try the Abyss Webserver.

Interestingly enough, Abyss is also free!  I ran it while my linux machine was being worked on (bad hard disk…it was a Quantum 200MB drive from 1913…had to upgrade) and it worked just great off of Windows XP.  Download that puppy and install it.  Make sure you read all of the documentation and familiarize yourself with how Abyss does business.

The next step…getting a hostname… is even easier than the linux method because you don’t have to manually install the noip client…they have a windows installer.  Go to http://www.no-ip.com/index.php and sign up.  Choose the domain name you would like (see above examples in Linux section).  Next, download the noip client from the download tab: https://www.no-ip.com/downloads.php but this time choose the windows client.  From there, you’ll be able to install this with a simple double click.  Fill in all of your information (pretty self explanatory) and make sure that it will run with each time you sign on.  You’re set! Your IP will now resolve to the yourchoice.theirhostname.com

CONCLUSION

You don’t have to spend a dime to keep a domain bound to your IP.  This is perfect for the home user who just wants a gallery or homepage.  It’s even good for someone who has a weblog or enthusiast site.  I would not recommend this to anyone who has a business and wants to run a site.  Just remember that the best things in life are free.  Thanks open source!!!

PS: It’s always good form to put a link of the stuff you are using on your website to direct traffic back to your software provider.  When I used noip, I included a noip link on my mainpage and also an abyss webserver icon as well.  It’s just good form and some companies/software providers necessitate the use of their logo or a link on sites that use their software/code.  Just be a nice person and give a linkback to them.  Good luck! Have fun!

PSS: Also, please note that having hosted my own webserver for quite some time (circa 2001) I’ve found Linux and Apache as a combination to be more secure, faster, and more stable than any webserver I’ve hosted on the Windows Platform. I included information on Windows mainly to introduce you to the concept of free and open source software. If you thought getting a webserver for free was great, think about getting a whole operating system! Give it a try, you don’t even have to install it (use a Live CD).

APPENDIX

If your ISP blocks port 80 traffic, your webserver won’t work.  Before deciding that your ISP is blocking however, make sure your firewall has the appropriate rules to allow incoming traffic.  You can do a quick add to IPTABLES in the following manner:

iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -j DROP

If you’ve opened up the appropriate ports and things still don’t work, it will be safe to say that you’ve determined the ISP is blocking port 80.  How you can get around this conundrum is to switch the listening port on the webserver to a different one and redirect traffic there.

  1. See how to do this for IIS Webservers
  2. See how to do this for Apache Webservers (normally in /etc/apache2/httpd.conf but your distro may vary.)
  3. See how to do this for Abyss Webservers

If you still have problems, drop me a line in the comments section.  I may not be able to answer all questions but I can most likely get you to a person/place/thing that can.  Have fun and thanks for reading!

This article was originally published on July 13, 2006 and has been updated and reposted.

Author: devnet

devnet has been a project manager for a Fortune 500 company, a Unix and Linux administrator, a Technical Writer, a System Analyst, and a Systems Engineer during his 20+ years working with Technology.

78 thoughts on “Host Your Own Domain and Webserver”

  1. I dunno. In America, you can get caught doing this and up getting banned by your provider. Besides, this can severely impact your own surfing bandwidth. Moreover, depending on what you want to host, you can get deals that range from $12 (1dollarhosting.com) to $20 (webcomindia.net) per year + domain registration fees. Heck, in the USA, you’ll spend more to take your family to a dinner and a movie than you would doing this, and the features go far for just that small sum.
    Supermike (Nevada, USA)

  2. Great introduction, but (naturally) I would make one change. Many providers, especially cable companies, discourage you from running your own webserver, blocking off port 80.

    You might want to remind people to review the carrier’s Acceptable Use Policy, and either point them to alternative carriers, or, if they are willing to risk it, how to use other ports (8080 is rarely blocked for example).

  3. Actually, as long as you’re not hosting a business site you’re a-ok as per comcast and Time Warner, which are the two largest cable internet providers in the USA.

  4. [quote]Many providers, especially cable companies, discourage you from running your own webserver, blocking off port 80[/quote]
    Actually, they don’t. As long as it is a personal non profit site, you’re in the green. Plus if they blocked port 80, you wouldn’t be able to surf the web…so that’s not going to happen.
    Hosting your own email server, now that’s a different story. Mainly because every single email provider out there blocks mail originated from dynamic blocks of IP addresses.

  5. Actually, many do block port 80 for INCOMING connections, hence no-ip.com offering a port 80 redirect service. This doesn’t affect browsing as the requests are outgoing.

    My ISP don’t mind me running my own mailserver but I do run into problems emailing certain people through it… not a problem as I can simply use my ISP’s mailservers for outgoing mail 🙂

  6. Very good article, inform me of the dns service avaialbe to run my own home box server. By the way, is this site run in your home brew box?

    What linux do you have for the server? redhat?

    Thanks for the info. I am thinking about use my sbc dsl connection to serve my hobby sites. I guess dsl is slower than cable?

  7. This blog is hosted…it outgrew the homebox I had it running on about mid 2005 (see http://linux-blog.org/index.php?/archives/82-New-Host,-Same-Blog.html )

    I’ll have an article coming out in the next two days that will address what Linux distribution I think is the best server so stay tuned. I’ve had over 190 uptime days for my last install of this Linux…it’s stable and best of all, you can configure it in 30 minutes. Keep checking back in the next couple of days.

  8. by the way…

    DSL is generally slower than cable…but will eventually become the method of choice when FIOS comes to be the main connection method. FIOS is fiber optic to the home…then they connect a DSL line from the fiber optic connection to your house. SBC pledges to make this happen in the US…but I’m not sure about other places.

  9. Great intro. I love it. I wish to buid a website that can be hosted in my Linux apache for my final project in Linux… However, I use Suse which is a lot more difficult to manage, it’s not bec I use it but bec. our class uses it on instructor’s preference. I’d like to see more details. Can anyone help?

    Thanks, Maria

  10. Fixed my port fowarding problem, Its that stupid ACTIONTEC ROUTER! You know the one..MI424WR. I opened that thing open so wide, a 6 yr old could have walked into my PC, but still i could NOT get any incomming connections via ANY PORT. So I cloned the MAC of the actiontec and entered it into my old POS linksys router which I had all setup from my last network, setup DynDNS and DNS client and bam, I’m in and fowarding ports like a champ. So its not the fios network that is not alowing incomming on any port, its that damn router they curse you with. So Fios is truthful when they say they are only blocking port 80 and 25 incomming. I hope this helps someone.

  11. I know this is kind of off topic but I figured that this may relate:

    I need help creating a web-based ftp server connected to a domain. I’m creating it so there is no limit on bandwidth or file restrictions (size, type, etc.). I’m currently doing this to make gb’s of music available to myself anywhere I go without worrying about dynamic IP’s.

    I’m new at this so can someone send me an email with step by step instructions?
    I’m trying to use a windows server 2003 platform.

    Thanks

  12. In windows, a very easy ftp server to setup and use would be guildFTP…it’s free as well.

    You can follow the instructions of this how-to with getting the domain to link back to your computer using no-ip. Then that will be your ftp url as well.

    Setup Guild using the instructions found at the website (google it) and you’ll be up and running in no time.

    The best thing for music though is to run a [url=http://www.jinzora.org/]Jinzora server[/url]. That way, you have ultimate control over listening to your music by streaming it instead of ftping it to each and every computer you login at.

  13. A lot of people _think_ that their ISPs are blocking port 80… But in reality…
    1) the user has not port forwarded port 80 under router
    2) the user has all kinds of anti-virus and firewall programs installed that are blocking ports, ips, apps, or just messing everything up
    3) the Windows XP SP2 native firewall is blocking incomming port 80 for Apache.exe/httpd.exe

    As an alternative to some of the above mentioned webservers for Windows, you should also take a look at the Web-Developer Server Suite. Use what works the best for you.

  14. Can you tell me more. I am fios and fighting with the same issue. Did your remove the actiontec and put your old linksys in its place?

    I want to get this working. I have fiosTV and it uses the actiontech, so I don’t think I can replace the actiontec.

    Thanks

  15. as far as I know my ISP doesnt block 80,last person who posted was right, The fact is your cable/dsl modem or router may not have port forwarding available or enabled, therefore you need to change to forward port 80 to your IP, and most ISPS will give you a static IP for free upon request for some packages (mine is free unless you have dsl lite then its only $4.99) My isp could care less that I am hosting a site here, I am still only getting the bandwidth they alow me , and they cant complain that I am actually using the bandwidth they gave me !

  16. I can’t view my website in the registered hostname
    :)where can i find the public directory of apache server:) i might be wrong because i put them in the htdocs of apache

  17. Well, actually Verizon does block port 80 where im at. Im not a novice user and I know for a fact that its being blocked from their servers. Im on a fiber home line , and prior to the was on their 2nd tier DSL service. The only way i was able to get around that was to use the port redirector using No-ip to get my site up.

    Just a bit more info for you all 🙂

  18. Wayne, regarding the work around for Verizon Fios block of port 80, do you know anyone who could help me do this? I have gotomypc, so whoever can help me can help remotely. I asked the Verizon sales person and also the tech if hosting my webserver would be a problem both assured me, no problem. Your help is appreciated. randm@thevine.net

  19. Rand

    Check out no-ip.com and register for free host / domain name services. I actually paid for my domain , but part of their services is a port redirector. All you have to do is tell no-ip on their website to forward port 80 requests made through their dns servers to something like port 8080. After you do that , just change the default port your apache server is running on. Everything on my end has been up and running great for the past couple years. I wouldnt host anything like a business site or anything with serious traffic tough because my understanding is that its against their policies on a home user line to run ANY kind of server.

    Hope this helps 🙂

  20. Hi,

    Thanks. Great info. But I am a bit mixed up.

    I have a static IP address that comes with my broadband. I have checked that I can access files on the Windows virtual server that I created using IIS; So, I can access something like // from anywhere on the web (n.n.n.n being my static IP address).

    Now, I have a domain name registered and use Google Apps/Sites for mail, docs and web hosting. What I want to do is put all of my data on my own computer instead of on Google’s server(s). Is there a way to do this?

    Thanks and regards.

  21. how do you host your own webserver without being caught by your ISP(COMCAST). Is it illegal? ANY SUGGESTIONS? I WANT TO MAKE A BUSSINESS SITE.

    1. It’s never good to host a business site on a personal connection…not only are they unreliable, but when your personal connection goes out…your business is out as well. Professional services maintain appropriate SLA (service level agreements) that allow you to have a rapid response should your site go down. I’d NEVER host a business site on my personal internet connection.

  22. Is it illegal to make money off my own webserver. My ISP is comcast. Will they accept this? Any suggesions on making money of my site?

  23. The newer D-Link routers support dynDNS out of the box. You just sign up for a free account, and then stick in your credentials into your router, make sure the port is forwarded, and you're good.

  24. for a blog, which many home users are looking for may I suggest wordpress also
    my older linksys router supports dnyDNS and TZO.com out of the box.
    Also there are a number of third party firmware options (alchemy) that support QOS (quality of service) so you can maintain personal surfing speeds.
    For advanced users also consider options that include iptables rules for your own router
    and with most of these options dont forget port forwarding which you will likely need to enable…
    cheers

  25. Very nice article. Im thinking about turning my old laptop into a web server. If I put Ubuntu Server Edition on it would this method still work?

    1. It should work regardless of distribution…you'll just have to setup your webserver differently depending on what distro you're using. But the client install should be similar 🙂

  26. Thank you so much for this post i wasnt even sure i could this with my no-ip host… bookedmarked for later =D i mean the theroy in my mind was there im like hmm its just redirecting to an ip but it wouldnt connect to my webserver but like you said my ISP may be blocking that so cheersssssss =D

  27. I have redirected my ports.conf to listen to port 8000, because httpd.conf is a blank file with Apache2, I also set up port forwarding on my Netgear router for port 8000 and I also tried to set my Iptables to port 8000 from the above instructions and I can’t connect to my index.html page when I type http://127.0.0.1 and when I put http://127.0.0.1:8000 into my browser I at least get an Apache error which looks like this “The requested URL / was not found on this server.
    Apache/2.2.14 (Ubuntu) Server at 127.0.0.1 Port 8000”

    I have been having a difficult time figuring out what I am doing wrong here.

  28. Thanks for all the help here…sometimes we are in two minds about which server should be better…actually we have to first understand our need rather than just see which one is the best.That has to suit the purpose and need too.

  29. Yeah it worked I jest allowed http,https and a couple of other programs through the firewall and it worked 🙂

    1. With hosting your own webserver at home…it’s too complicated to do this…unless you have a static IP address. So if you don’t have a static IP address (99% of all internet connections from home are not static) then I’d advise to not even try using a custom domain like this.

      If you do have a static IP, you’ll have to pay a 3rd party DNS service to resolve your domain to your IP and that is beyond the scope of this article.

    1. subdomains are still domains. If you read the article it talks about the cost associated with top level domains and why using a subdomain to host a website is cost efficient. Sorry that you found an article written 6 years ago a ‘fail’.

  30. Hi,

    I am planning to create an networking website. I can buy the domain from godaddy but please tell me how can i own a server and host my website. I have no idea how things work at the back end. please help me by providing some links so that i can go through and understand it.

    Thanks in advance 🙂 🙂 🙂

    1. That’s a pretty big and broad question. I’d suggest that you look at 2 options:

      1) VPS Hosting

      2) Co-location Hosting

      This is the only way that you can own your own server (have root on it) and host your website. I recommend VPS Hosting as it is more cost affordable. I use Linode and I find them to be quite stable, affordable, and amazing.

  31. bullshit, you said that the no-ip gives you a free domain. That is a subdomain! This was a waste of my time!

  32. any exprience with a VPS ubuntu.12.4.4 with Virtualmin / Webmin – hosting your own DNS resolving to a free top level domain which then uses your external ip to resolve to a top level domain ( ive been testing out hypothisis using a virtual machine and i cant get it to resolve to the http://www.sitename.tk )<— free top level domain even using dot.tk

    google it ( they have a custom dns if you host your own ) the idea is great but soon im gonna try using a dedicated machine to host using the same config no virtual config ever.

    i should get better results removing the virutal machine aspect and having it hosted on its dedicated platform

  33. Develop Robots offers great windows and linux hosting through their dedicated servers. Develop Robots is a great web development company that helped me out with all my digital media needs.
    Visit http://www.developrobots.com to host your domain on their dedicated servers.

Comments are closed.

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.