Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been building up a Web app and want to test it in my iPhone in order to check that the responsive functionality works properly in mobile devices. When I develop it on my MacBook Pro, which connects to the Internet through Wi-Fi, I can access to localhost from iPhone by typing in the IP address to the address bar in Safari in iPhone.

However, my Desktop connects to the Internet using Thunderbolt Ethernet cable, and while it can connect with Wi-Fi by manually setting the Ethernet off, I still don't like to bother to disconnecting it just to check how my Web app works in mobile screen, and instead want to test it as readily as it is with Wi-Fi and typing in the address bar, like I said in my MacBook Pro case.

So is it feasible to connect to localhost from iPhone with Ethernet being used instead of Wi-Fi? I don't mind it if it's not "typing in address bar in Safari" or something like that, if there are other ways to resolve the issue here.

I use Mavericks 10.9.2 and iPhone 5 with iOS 7.1.1. I connect to localhost with node.js as backend, through port 3000.

share|improve this question

migrated from May 1 '14 at 11:57

This question came from our site for system and network administrators.

Put the backend device (your Mac) and the iPhone on the same network.

Go to System Preferences > Network. Make the selection for "Wifi."

You should see an IP address there. Most cases it is 192.168.1.???. Plug that in, and that should do it.

share|improve this answer

All of your devices are connected to the same LAN, right? Connecting over the LAN IP should work then normally, assuming that the IP you are connecting to is on the same LAN, either by using WLAN or the ethernet cable, and of course that there are no rules in the switch itself preventing devices inside the LAN from communicating.

share|improve this answer

You must log in to answer this question.

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