is it possible for me to connect to http://localhost websites on my laptop from my phone without any internet connection?

Phone is Samsung Galaxy W. Laptop Acer with Windows 7. The server I'm using on the laptop is XAMPP at the moment, but this can be changed if another program is easier.

Basically, I want to connect to my laptop server from the phone without router or internet connection.

I know the phone is supposed to have hotspot functionality, does this work without internet (just bought it so I don't know much about it yet)?

3 Answers 3


One solution to your problem probably is Reverse Tether:

Reverse Tether Reverse Tether

Other than your hotspot functionality (which lets you use your phones Internet connection with other devices via Wifi), this allows you to use your computers network via USB, as the screenshots imply. Thus your phone gets a (configurable) IP address (pic1: "Desired IP") matching your computers (pic1: "Gateway IP"; it is important that both are part of the same subnet), and then you can access your computers web services from your Android device as described before (using the computer's IP).

Drawback: This solution requires your device to be rooted. I will check further, maybe I find a similar solution not requiring root, and then will update my answer with that new information.


If your computer is equipped with Wifi, an "adhoc connection" could also provide a solution. You might want to take a look at the question How to connect android wifi to adhoc wifi? for details on this. And there is a brand new article just published today at PC Advisor: Connect Android phone to Ad Hoc network, which might be even more helpful to you.

  • That adhoc network thing looks just like what I was looking for. Will look into it thanks alot. Jul 30, 2012 at 21:44
  • Glad I was able to help! Would be nice if you also could add your results on adhoc here, once your reached them ;)
    – Izzy
    Jul 30, 2012 at 21:51

Assuming the phone and your laptop are on the same network AND the web server is listening on the right ports, you should be able to just use the local IP of your laptop. (or whatever the IP address happens to be)

  • Okay, I don't need a router for them to be on the same network right? Jul 30, 2012 at 18:08
  • 2
    Well, I expect you would. My answer assumes that you're using the phone on your home wifi network. If not, you'll need to punch holes in your firewall to access your laptop from the Internet.
    – ale
    Jul 30, 2012 at 18:10
  • If the OP requires access to http://localhost/ (as the special service is bound to localhost -- i.e., another IP address won't help. @hustlerinc, maybe you give some more details on what you want to achieve: What kind of localhost service etc., and if you can only reach it on http://localhost or also on your computers other IP address (execute ipconfig on a command prompt to find out your IP addresses).
    – Izzy
    Jul 30, 2012 at 18:46
  • @Izzy It looks like the OP is running a webserver on their laptop, which they wish to access from another machine (a phone) on their LAN. In this case, accessing http://laptop-ip/ should be sufficient; if firewalls permit. Although, it might be questionable whether they actually have a LAN set up?
    – MrWhite
    Jul 30, 2012 at 19:31
  • Yeah, w3d assumed right, only that I'm not using router or LAN. I would like to setup this connection on the run, wherever I am (to be able to test my browser games on the phone without downloading). And I added some info in the post. Jul 30, 2012 at 19:35

Can be done through a bluetooth PAN network using the internet sharing feature on smartphone. As soon as both belong in same PAN network, smartphone can navigate host's web server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .