How to Access a Website Running on Localhost from a Mobile Phone

Tyler Tyler (291)
5 minutes

If you have a website running on your computer that you typically access by visiting http://localhost, you can also access this site from your mobile phone as long as both computers are connected to the same network.

Posted in these interests:
h/networking25 guides
h/webdev59 guides

You'll need to connect both devices to the same network. So make sure your mobile phone is connected to the same Wi-Fi network that your computer is using.

For Windows, you can find the IP address by visiting Control Panel. In the search box, search for "adapter". Click on View Network Connections. Select the active network connection and click View status of this connection. Click Details and the IP address should be found next to IPv4 Address.

For Mac, open the Network Utility. You can find this quickly with Spotlight by typing cmd + space and then start typing "Network". With Network Utility open, your IP address can be found next to the label IP Address.

If you prefer, instead of using the IP address, you can use the hostname. This might be preferable so you don't have to keep looking up the IP address every time you change networks.

On Windows, click Start. Then right-click on Computer and select Properties. Then click the Computer Name tab.

On Mac, open System Preferences and click Sharing. Look for the text that reads: Computers on your local network can access your computer at: computer-name.local.

Using your mobile browser, simply type the IP address or host name into the URL bar. Make sure to include any necessary ports or paths required to view your website.

Dayne Dayne (57)
10 minutes

Deep inside your router settings, you are able to change the channel that your router broadcasts its signal. 2.4GHz and 5GHz are the most common frequencies for routers.