How to host a web server in your PC/laptop at home and make it accessible by public from Internet

  1. Develop your web site
    • I’m using Visual Studio ASP Net Core (MVC/RazorPages) to build a web application hosted in Microsoft Windows IIS (internet Information Service).
    • Other methods that I know:
      • Create a HTML file using simple text editor, may also include javascript
      • Create an PHP app and host it in Apache web server
  2. Publish it to your IIS where the web app is hosted
  3. Configure your IIS where the web app is hosted
  4. Ensure that firewall is opened for the ports you are using (typically port 80 for HTTP or 443 for HTTPS) in the PC/laptop the web app is hosted
  5. Ensure that the PC/laptop hosting your web app is using static IP (not dynamic IP)
  6. Ensure that the PC/laptop hosting your web app is connected to the internet
  7. Test accessing your website from localhost or any other PC/laptop in the same network subnet
  8. Configure your home/local router so that the PC/laptop hosting your web app is in DMZ zone, or you can also use port forwarding
  9. Contact your ISP to get a public IP (subscription)
  10. Access your website from internet using the public IP

Get Your Domain

  1. Subscribe from domain name providers to get your domain name
  2. Configure the CNAME in the domain provider tools to point to your public IP provided by your ISP
  3. Access your website from internet using the public IP

To use SSL for HTTPS

  1. Get a certificate from the SSL provider (subscription/free)
  2. Install the certificate in PC/laptop hosting your web app
  3. Configure IIS to enable SSL for your website

You can contact me if need clarifications.

You can also check out my website hosted in my laptop at home www.yangdekat.com

Cheers

Leave a comment