Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I currently developed a new website. The website is plain html. How can I host this website on my own computer. My computer is always connected to the Internet. How can I host my website on my computer and give it a domain name which will be known to everyone outside using the Internet?

share|improve this question
1  
Hosting at "home" is not so complex, but if you aim at offering a professional product/service to your customer/user you should really think about getting a shared hosting (it can cost 60$/year). With the setup you are talking about the bandwidth will be slower, you could have problem sending e-mail from that domain name (if you ever need @yourdomain.com email), if your ISP is down your website won't be available, etc. –  Dominique Apr 1 '11 at 14:20
2  
I wouldn't do this just because now the attack surface is bigger on your home machine for malware. Do you really want automated bots constantly trying to break in to your house? –  Knox Apr 1 '11 at 14:44
2  
On a side note, you should also check with your ISP plan, as most I've seen don't allow web hosting with the basic home service plan. Not a technical limitation, but a legal one. However, they may offer this once you have paid for a static IP or their business services. –  Levinaris Apr 1 '11 at 16:39
add comment

3 Answers 3

I would only recommend this if you are having low usage/visitors or a very fast internet connection.

All you need to do is install a web server such as Apache or IIS and copy all the HTML files to the root directory of the webserver.

Then, make sure you forward port 80 from your router to the machine.

I wrote a bigger guide on Superuser. Link.

There are a few more steps involved, but I hope this puts you on the right track. This is not really a "Pro Webmaster" question.

share|improve this answer
    
please add more steps if possible. I dont see any more steps on the link provided. –  Brian McCarthy Apr 1 '11 at 14:14
add comment

There is no excuse to do this when cheap and free hosts are available.

Reliability issues and limitations of your OS aside, the cost of a host even when you pay is lower than the electricity your own pc will waste.

share|improve this answer
2  
Free hosting are offering a quality of hosting/support for what you paid for, nothing. They can do the job for amateur/hobby website but I would never recommend those as they have alot of limitation and often a poor bandwidth/high rate of site per server. –  Dominique Apr 1 '11 at 14:17
3  
Free hosting can often scale quite well eg. some of the google offerings. In other cases at least if it gets swamped it won't also be taking out your own connection to the net! Not to mention that if he intends to run it on his own pc on a residential style connection which is what this sort of question implies, even a poor quality free host will be a lot more reliable. –  JamesRyan Apr 1 '11 at 14:25
add comment

first of all, you should be aware your computer needs to be on all the time. As soon as you shut down your computer, your site goes down.

That said here's how to do it: 1) First check with your ISP if you have a fixed IP address, a dynamic IP wont work. After that check with your ISP if they allow hosting sites. Some dont.

2) Download any web server like the Apache server, if you are on Ubuntu, here's a simple tutorial to do it

3) After installing copy all your files in the www folder or htdocs whichever is there.

4) Put it online, on linux it will already be...

5) Point your domain name to your fixed IP address and redirect ports if necessary.

6) It should work. Just recommend you to take some book or professional tutorial before doing that on a production site. If you are just trying, experiment with it.

Just one advice, take a hosting, its better because the servers are handled by professional companies and have almost 100% uptime guarantee. Also in the long term they will be cheaper because you will incur high electricity and internet costs in your home hosting.

Hope that helped you.

share|improve this answer
    
You can still do this with a dynamic IP address. There are services that allow you to install a little program on your computer, and eact time your dynamic IP changes it updates it in the DNS records so your domain always points to your IP address, even when it changes. –  Sherwin Flight Apr 20 '12 at 8:00
    
no-ip.com is one of them –  Sherwin Flight Apr 20 '12 at 8:01
    
dnsdynamic.org is another –  Sherwin Flight Apr 20 '12 at 8:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.