6. Putting Your Local Host Server Online
Read Previous: #5. How Much It Cost to Host a Website
6. Putting Your Local Host Server Online
Once you host a website on your local server, it will only be available to you. You’ll need to change its settings to put your website on the internet.
First, locate your web server software’s configuration file called httpd.conf.
If you are using WAMP on Windows, then you’ll find it under C:wampinpachepache[version#]conf] folder.
MAMP users on Mac will find it inside /Applications/MAMP/conf/apache/ folder.
You can open this file using a plain text editor like Notepad or TextEdit. After that, you need to find the line that begins with
You need to replace it with your IP address and port number. You can find your IP address by simply Googling ‘what is my ip address’ it will show you a numeric string separated by dots. Here’s an example of what that code should look like with your IP:
Next, you need to find the following line:
Go ahead and change it by replacing localhost:80 with your IP address.
Next, you need to find the following line for WAMP:
If you are using MAMP, then look for the following line:
Below this line you’ll see the access permissions, which you need to replace with the following:
Allow from all
You can now save your configuration file and restart your local server with the new permissions.
Now anyone can use your IP address to access your website instead of localhost. This is not an ideal situation as it would be hard for your users to remember the IP address.
That’s where domain names come in handy.
Pointing Your Domain Name to a Locally Hosted Website
Pointing your domain name to a website that you are hosting on your own computer will allow users to access it as they would do with any other site.
First, you need to edit your domain name’s DNS settings. We’re using Domain.com in our screenshots below:
Editing DNS settings for your domain name
After that, you need to edit the A name record with @ sign as the Name. If you don’t have one, then click on Add new record button to proceed.
Adding A record for your domain
In the value field, you need to enter your computer’s IP address and click on the Update DNS button to save your changes.
If the computer with your local server is connected to the internet directly, then you are all done.
However, if your computer is connected to the internet via router then you need to forward ports. To do that, you need to login to your router’s admin interface by entering the router’s IP address in your browser address bar.
Depending on the manufacturer, your router interface may look slightly different. You will need to find the option labeled port forwarding, virtual server, or NAT.
Next, you need to forward web or HTTP traffic to port 80. In the IP address field, you need to enter the IP address of your computer on the local network. This IP address is the internal address that identifies your computer on the local network.
After that, you need to apply the changes and restart your router.
Disadvantages of Hosting a Website by Yourself
Hosting your website on a local computer is a bad idea. This is why even the tech giants with enough resources, skills, and know-how prefer to go with a hosting service provider.
Following are just a few disadvantages of hosting a website on local computer.
In order to run a web server, you need to put it on a computer connected to a high-speed internet connection 24 hours a day.
You also need to install updates for the web server software, keep backups, plan on a backup server, and more.
The computer hosting your website will also be open to hacking attempts, malware injection, and DDOS attacks. This could also affect the security of all other computers on your network.
You will need to purchase a static IP address from your internet service provider, which will cost you extra.
Doing all this will require a lot of time, effort, and technical skills. This is why it is a bad idea to host your website on a local computer by yourself.
Read Next: #7. FAQs about Website Hosting
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We are independently owned and we have spent time and effort doing our best to offer you the most relevant and accurate information. All the "customer reviews" are posted by real webmasters (hosting customers) and we're not responsable for their opinions. Purchasing any service from the hosting companies listed on our site is your solely decision.
|Stats Panel||Last 24h||Last Month||Total|