On a Mac or PC you can point a domain at a different server by editing /etc/hosts. It’s the classic way to preview a site on a new server before DNS changes, or to send an app to a staging machine. iPhone has no hosts file you can edit unless you jailbreak it. HTTPS Capture offers the same result with Hosts rules, with no jailbreak and no DNS server to run.
How it works
While capture is on, HTTP and HTTPS connections pass through HTTPS Capture’s local proxy. When a domain matches a Hosts rule, the proxy connects to the address you entered instead of the one DNS returns. The URL, the Host header and the TLS server name (SNI) all keep the original domain. The target server therefore still serves the right site and certificate, just like a hosts file entry.
Step 1: Add a Hosts rule
- On the Capture tab, tap Rules → Hosts.
- Turn on Enable Hosts Mapping and tap +.
- Pattern: the domain to override, for example
www.example.com. Use*.example.comto cover all subdomains. - Target: an IP address such as
203.0.113.10, or another domain name. - Add a comment if you like, and save.
Step 2: Start capture and test
Start capture, then open the website in Safari or launch the app. Requests to the domain now go to the target server. Open a request and look at Overview to check the remote IP it actually connected to.
Rules apply live. Turn a rule off and the next connection goes back to normal DNS. You do not need to restart capture.
Typical uses
- Preview a website migration before you switch DNS.
- Point an app at a staging or local server at
192.168.x.xwithout a special build. - Test one node of a CDN or a load balancer directly.
- Switch environments quickly: keep a separate Profile for production, staging and local, and change between them from the top-left menu.
Limits compared with a real hosts file
- Rules only apply while capture is running, because they work inside HTTPS Capture’s tunnel.
- They cover HTTP and HTTPS traffic that goes through the proxy. Other protocols, such as game traffic over raw TCP or UDP, are not remapped.
- For HTTPS sites, install and trust the CA certificate first. Hosts rules work on the connections that HTTPS Capture handles itself.
Hosts vs. Map Remote
Hosts only changes which IP you connect to. The domain, path and port stay the same. To send requests to a different domain, port, scheme or path, for example https://api.example.com/v1 → http://192.168.1.20:8080/v2, use Map Remote.
Ready to try it?
HTTPS Capture · Capture and decrypt HTTPS traffic on iPhone
Free on the App Store