Are you looking to access your locally hosted website from another computer outside your network, but don't have a domain name? Don't worry, we've got you covered! In this article, we'll guide you through the process step by step.
Step 1: Find your local IP address
The first thing you need to do is find the local IP address of the computer hosting your website. To do this, follow these steps:
- On the computer hosting the website, open the command prompt. You can do this by pressing the Windows key + R, typing "cmd" and hitting enter.
- In the command prompt, type
ipconfigand hit enter. - Look for the "IPv4 Address" under the "Ethernet adapter" or "Wi-Fi" section. This is your local IP address.
Step 2: Configure port forwarding
Next, you need to configure port forwarding on your router to allow external access to your locally hosted website. Here's how:
- Open a web browser and enter your router's IP address in the address bar. This is usually something like 192.168.0.1 or 192.168.1.1. If you're not sure, check your router's manual or contact your internet service provider.
- Login to your router using the admin credentials. Again, if you're not sure, check your router's manual.
- Find the "Port Forwarding" or "Virtual Server" section in your router's settings. The location and name may vary depending on your router's brand and model.
- Create a new port forwarding rule by specifying the following:
- Service Name: Choose a name for the rule (e.g., "Web Server").
- Internal IP Address: Enter the local IP address of the computer hosting the website.
- Internal Port: Enter the port number on which your website is running (e.g., 80 for HTTP).
- External Port: Enter a port number of your choice (e.g., 8080).
- Protocol: Select TCP.
- Save the changes and exit your router's settings.
Step 3: Access your website from another computer
Now that you've set up port forwarding, you can access your locally hosted website from another computer outside your network using the following steps:
- On the remote computer, open a web browser.
- Enter your public IP address followed by the external port number you specified during port forwarding. The format should be something like this:
http://your_public_ip:8080. - If everything is set up correctly, you should now see your locally hosted website!
That's it! You can now access your locally hosted website from another computer outside your network without a domain name. Remember, your public IP address may change over time, so you might need to update it if you can't access your website in the future.
References
| Source | Link |
|---|---|
| How to Find Your Local IP Address | https://www.howtogeek.com/233952/how-to-find-your-routers-ip-address-on-any-computer-smartphone-or-tablet/ |
| How to Set Up Port Forwarding | https://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ |