I use Windows 10 as my programming environment for writing websites with a Debian VirtualBox that the actual web server runs on.

So when I need to test my websites, all I had to do was add them to my hosts file and I'm good to go.

Now the problem comes because I'm trying to test my local websites with my iPhone. I've followed the tutorial here http://www.windowscentral.com/how-turn-your-windows-10-pc-wireless-hotspot to help me connect my phone to my computer's internet connection hoping that I would be able to go to "dev.testsite.com" from my phone now, but it seems as though the Windows hosts file isn't being used by my phone.

Is there a way to set this up so that the iPhone uses the hosts file from my Windows computer to figure out which DNS records I have overridden?

  • Is this a Personal or Commercial application? – DeerSpotter Feb 6 '17 at 19:30

When the PC and iPhone are on the same network, you may set the PC as the proxy for the iPhone. Here are some solutions that do not require jail-breaking:

  1. Use Microsoft's Fiddler, a free web debugging proxy.
    For a Web developer this will have the additional benefit of logging all traffic for debug.
    See the article Monitoring iPhone web traffic (with Fiddler).

  2. Use Weblock - AdBlock for apps and websites ($1.99).
    See this StackOverflow answer for details.

  3. Use the Charles HTTP proxy / HTTP monitor / Reverse Proxy ($50).
    This is another monitoring solution for developers.
    See this StackOverflow answer for details.

| improve this answer | |
  • Oh wow this is an old question, but yes I've forgotten about this since and I have solved it myself, once with this method, and the second time I jailbroke my iPhone and just edited the hosts file, which is what I'm still doing now. But I do know that your answer works from personal experience so I'll mark this as accepted – Brian Leishman Feb 6 '17 at 20:46
  • this is why i asked for commercial reasons, some of those apps have different licensing costs. I guess harrymc beat me to it. – DeerSpotter Feb 6 '17 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.