How to Host My Own Website
Most websites are hosted by professional web hosting companies due to their reliability, speed and ease of use. However, unless a website is very large, it can be hosted at home on a regular computer. A broadband connection such as DSL or cable will be required or the connection speed won't be fast enough to load pages in a reasonable amount of time.Since home Internet connections are not nearly as fast as the ones professional web servers utilize, it is important to keep your site's files as small as possible. Resize all of the images as small as possible, and try to avoid using bandwidth-intensive features such as Flash and streaming audio or video.
Select the computer you will use as a server. This can be a system dedicated only to hosting the website or your regular desktop PC, as long as you're willing to leave it running all the time. Hosting a website does not use a lot of system resources (other than the Internet connection), so nearly any computer will be fast enough to function as a web server. Laptops should never be used for this task since they are not designed to run for extended periods of time.
Install a web server application. They are many to choose from, but Apache is, by far, the most popular choice. According to Netcraft, a web analysis organization, 71% of servers use Apache's software. It can be downloaded for free from its website (see Resources below). The MSI installer package installs just like any other software application. During the setup process, you will be asked several questions, such as your domain name (if you have one) and where you want the website files folder located. You will also be asked for the IP address of your DNS server. This information was provided to you when you registered your domain name. If you're not going to be using a domain name, then you can leave this field blank.
Copy the entire contents of your website (including all images) to the website files folder you specified during the installation process. Anything that you add to this folder will be accessible by anyone on the Internet.
Configure the forwarding of port 80 from your router to the computer running the hosting software. If you're not using a router, then this won't be necessary. Each router is different, so the steps needed will vary from one model to the next. If you don't know how to change the settings on your router, consult its documentation for more information. Port 80 will need to be forwarded to the computer running the hosting software or all connections will be blocked.
Visit your domain name's registrar (the company that manages the domain), log in using your unique username and password, and link your domain name to your computer's IP address. You can find out what your IP address is for free from a number of online websites. If you're not going to use a domain name, you can instead give users your IP address. They can then enter that number into their browser just like an URL, and your website will be brought up.
Tips & Warnings
- If you have a dynamic IP address that changes routinely, use a service such as DynDNS to instantly update your domain name settings when your IP changes.
- Never store personal or sensitive files in your website files folder since there is a chance that it could be accessible to anyone.