How Can You Separate IP-Based Location from GPS-Based Location in App Testing?
An app can learn where you are from the network address or from the device sensors. This guide shows a simple test routine that tells the two apart and records what you find.
11 min readUpdated Nov 20, 2026By XPASS Editorial Team

You open a delivery app while a VPN is connected to a server in another country. The app greets you with that country's currency, yet the map still centres on the street where you are sitting. Or the opposite happens: you turn the VPN off and the app keeps insisting you are somewhere else. When this happens, most people ask the same question: where does this app think I am, and how does it know?
The answer is almost always that the app is using two different kinds of location, and mixing them up makes every test confusing. This article gives you a practical routine for separating them. It is written for ordinary users, testers and curious people who want to understand their own phone or laptop. You will learn how the two signals work, how to set up a clean test, which steps to run with the VPN on and off, how to record the results in a simple table, and what to do when the results look contradictory. It does not teach you to fake a position on a service that forbids it.
The two kinds of location in one minute
An app, or a website, can learn roughly where you are in two quite different ways.
The first is IP-based location. Every connection that reaches the internet comes from a public IP address. A service looks the address up in a location database, which says something like "this range belongs to a provider in this country, and probably this region." You do not have to grant any permission for this to happen, because the address arrives with every request. The Internet Protocol describes how addresses work, but nothing in it says where an address physically is. The place is a guess made by the database, which is why it can be stale or wrong. The article on how location databases decide explains why.
The second is device-based location, which most people call GPS. The app asks the operating system for a position, the system asks you for permission, and if you allow it the device answers. The answer may combine satellite signals, the names and signal strength of nearby Wi-Fi networks, Bluetooth, and mobile towers. Apple and Google both describe in their documentation that apps must declare and ask for this access. On Apple platforms, App Privacy Details show what an app says it collects, and that includes location data.
| Feature | IP-based location | Device-based (GPS) location |
|---|---|---|
| Where the information comes from | The public IP address of the connection | Satellites, nearby Wi-Fi, Bluetooth, towers on the device |
| Needs your permission | No | Yes, the system asks you |
| Typical precision | Country, region or city, sometimes wrong | Street or building, sometimes less |
| Changes when a VPN connects | Yes, it follows the VPN server | No, not directly |
| Can be cached by the app | Yes | Yes |
That last row matters. Both kinds can be remembered by an app, and a remembered value looks exactly like a fresh one on screen.

What a VPN changes and what it leaves alone
A VPN sends your traffic through a server run by the VPN supplier. Websites and app servers then see the address of that server instead of the address your home or mobile network gave you. That is the whole effect on IP-based location, and it is why a fresh IP lookup on a page usually shows the VPN server's country. The caveat is that the database used by the page may disagree with the server's true location, which is covered in why your VPN shows the wrong location.
A VPN does not reach into your device. It does not change what the satellite receiver hears, which Wi-Fi networks are in range, or which mobile tower you are connected to. It also does not remove permissions you granted to an app. So an app that has location permission can still read a precise device position while the VPN is on.
This split is your testing tool. If you change the VPN and the app's answer changes, the app used the IP address. If you change the VPN and the answer stays put, the app is probably using the device. If you change the device permission and the answer changes, the app used the device. You separate the two by changing one input at a time.
Prepare a clean test before you touch the VPN
Poor results nearly always come from a messy starting point. Spend a few minutes on preparation.
- Pick one app and one action. Choose something that visibly depends on location, such as a weather screen, a store finder, a map centre, a "nearby" list, or a price or currency display. Use the same action every time.
- Write down your real situation. Note the city you are really in, the type of network (home Wi-Fi, mobile data, hotel Wi-Fi) and whether your phone has a SIM that belongs to a different country.
- Check the starting permission. Open the system settings for the app and note whether location is set to never, ask next time, while using the app, or always, and whether precise location is on.
- Clear what you reasonably can. Close the app fully. If the app has a setting for location or region, note it. Some apps remember a city you searched for earlier, and that value will beat both signals.
- Sign out if the account has a saved region. Many apps store a home country or city against the account. If you test while signed in, that stored value can override everything else. If you must stay signed in, record the stored region as a third factor.
- Prepare a plain IP check. Have a page ready that shows the public address and the place a database associates with it. The result is a guess, so treat it as one reading, not as the truth.
If you build the app yourself, your platform's documentation describes simulated locations for test builds. For an app you do not own, stay with observing. Changing the position an online service sees can go against its rules, and the point of this routine is to understand, not to deceive.
The four-run test routine
The routine below uses four runs. Each changes exactly one thing from the run before. Keep the app, the action and the network the same.
Run 1: VPN off, permission denied
Set the app's location permission to never, or choose the option that does not share location. Close the app fully, reopen it, and perform your action. Whatever location the app now shows cannot come from the device, because the device refused to answer. If the app still shows a place, that place came from the IP address, from a stored account region, or from a cached value. Record the place and what the app said about it.
Run 2: VPN on, permission denied
Connect the VPN to a server in a country clearly different from where you are. Wait until the app shows it is connected, then close and reopen the test app. Perform the same action. If the place changed to match the server country, you have confirmed that this app reads the IP address. If it did not change, the app may be using a cached value, a stored account region, or a database that has not yet learned the new address. Record the result and repeat the run once more after a minute or two before drawing conclusions.
Run 3: VPN on, permission allowed
Keep the VPN connected. Now grant the permission, choosing "while using the app" if offered, and reopen the app. Run the action. If the place moves back to your real surroundings while the VPN stays on, the app prefers the device position when it has it. If the place stays at the server country, the app may be reading the IP address first, or it may be showing a value from earlier runs. Record whether the app showed any message about precise location.
Run 4: VPN off, permission allowed
Disconnect the VPN and reopen the app. This gives you the normal baseline: a device position and your normal IP address. Compare it with Run 3. If Runs 3 and 4 match, the app is using the device and ignores the VPN for that feature. If they differ, the app is mixing both signals, and you should look at which part of the screen uses which.
Record the results so you can compare them
A short table prevents the common mistake of trusting memory. Copy the layout below into a notes app and fill it in during the test.
| Run | VPN | Permission | Place the app showed | Place a plain IP check showed | Notes |
|---|---|---|---|---|---|
| 1 | Off | Denied | |||
| 2 | On | Denied | |||
| 3 | On | Allowed | |||
| 4 | Off | Allowed |
Add three more columns if the test is important: the time of the run, the type of network, and whether the app was fully closed beforehand. A reading that looks odd often turns out to be the one where the app was only sent to the background.
Here is a plain worked example. Imagine you are in Chiang Mai testing a weather app, with the VPN server in another country.
- Run 1: VPN off, permission denied. The app shows Chiang Mai. You are surprised, since you denied permission. A plain IP check also shows Chiang Mai, so the app is using the IP address.
- Run 2: VPN on, permission denied. The app shows a city in the server country, and the IP check agrees. The app follows the IP address.
- Run 3: VPN on, permission allowed. The app shows Chiang Mai again, but the IP check still says the server country. The app switched to the device position as soon as it was allowed.
- Run 4: VPN off, permission allowed. The app shows Chiang Mai, and so does the IP check. The baseline is consistent.
The conclusion is clean and useful: this app uses the IP address when permission is denied and the device position when it is allowed. You now know which switch to change when the app shows the wrong place.
Reading the results that do not fit
Not every test ends as neatly as the example. These are the usual surprises.
The place never changes with the VPN, even with permission denied. The app may be showing a cached or stored value. Force-close the app, then check the account or app settings for a saved home region. Some apps ask for a city once and never ask again. Also check that the VPN really carries the app's traffic: some systems and apps handle network traffic in ways that depend on settings, so confirm first that the VPN is really connected and that a plain IP check shows the server address.
The place changes, but to a surprising city. This is probably the location database. The VPN server may be correct while the database places its address range elsewhere. Try a plain IP check on two different pages. If they disagree with each other, you are looking at database differences, not an app fault.
The app shows a mixture. It is common for one screen to use the address (currency, language, content catalogue) and another to use the device (map centre, nearby list). Test each element separately and note which signal drives each.
The result flips between runs for no clear reason. Check whether the app updates location only on launch, only every so often, or only when you pull to refresh. Also check whether precise location is on, because with approximate location the app may only receive a coarse position that looks different from a precise one. On iPhone, the cached behaviour of apps is covered in why iPhone apps keep using cached location after a VPN.
A browser behaves differently from the app. Browsers have their own permission for each site and may use a different method. The difference between the two is explained in browser geolocation versus your VPN server country.

Other signals that muddy the picture
Even with the IP address and GPS neatly separated, an app can use extra clues, and these will show up in your test as unexplained results.
- Time zone and language. Your device settings report them, and an app can compare them with the IP-based country. A mismatch changes nothing about the VPN, but it can make a service suspicious or simply change the wording of a page.
- The SIM card and mobile network. A phone with a SIM from one country connected to a network in another can report both. Some apps read the mobile country code, and the VPN does not change it.
- Nearby Wi-Fi networks. Location services use the names of nearby networks to estimate where you are. This happens at the device level, so a VPN does not alter it.
- Account details. A billing country, a delivery address or a phone number prefix can all point to a place regardless of the connection.
- Stored history. Searches, saved places and past orders can steer what an app shows, long after the connection that produced them has gone.
If your test results still do not make sense, ask which of these an app could be using for the particular feature you are watching. Then change that one input only.
Limits and what to watch for
A test like this has real limits, and it is worth stating them plainly.
First, you only see the screen, not the reasoning behind it. An app might read your location internally and still show you something else, because the logic that decides what to display is hidden from you. Your results show what the app does in your tests, not a full account of everything it collects.
Second, a VPN is not a privacy switch for location. It changes the address that outside servers see. It does not stop an app with permission from reading your device position, and it does not remove data an app has already stored. If you want less location sharing, the effective tools are the permission settings, the precise-location toggle, and the choice of which apps get access at all. Auditing those permissions before a trip is a sensible habit, and the EFF Surveillance Self-Defense pages explain the thinking behind limiting what you share.
Third, results vary by device, operating system version, app version and region. Behaviour you see today may change after an update, so write the app and system versions at the top of your notes.
Fourth, do not use this routine to get around a service's rules. If an app is limited to certain regions or checks your position for legal or safety reasons, trying to mislead it can lead to a locked account and may breach its terms. A VPN also gives no guarantee that a given app or site will work or unlock.
A short checklist you can reuse
Print or copy this list for the next time an app seems to disagree with the VPN.
- Note the real city, the network type and the app and system versions.
- Choose one visible location-dependent action.
- Fully close the app before every run.
- Run it four ways: VPN off or on, permission denied or allowed.
- Check the IP once per run with the same page.
- Write the result of each run in a table.
- Look for what changed, and name the signal that changed with it.
- If the result is odd, check for a stored account region, a cached value and approximate location.
- Repeat the surprising run once to be sure it was not a one-off.
- Restore your normal settings afterwards, including the permission you changed.
The last step is easy to forget. If you set an app to "never" for the test, set it back to the choice you actually want, such as "while using the app", so the app still works the way you expect.
Summary
An app can learn where you are from the IP address, which a VPN changes, or from the device position, which a VPN leaves alone. You separate the two by running the same action four times with the VPN on and off and permission denied and allowed, changing one thing at a time, and writing each result in a table. The pattern in the table tells you which signal drives each part of the app, and it also exposes cached values, stored account regions and database mistakes. Keep in mind that a VPN does not make an app forget your device position, and that tests like these are for understanding your own setup. If you want a pass that lets you repeat these checks with a VPN connected, you can look at the XPASS pricing page and pick the number of days that suits you.
Frequently asked questions
What is the difference between IP-based location and GPS-based location?
IP-based location is a guess made from the public IP address of your connection, using a database that links address ranges to places. GPS-based location comes from your device, which may combine satellite signals, nearby Wi-Fi networks, Bluetooth and mobile towers. The first usually points at a city or region and can be wrong. The second can be much more precise, and an app can read it only if you grant permission.
How can I tell which kind of location an app is using?
Run the same action in the app under controlled conditions and change one thing at a time. Turn the VPN on and off with location permission denied, then repeat with permission allowed. If the result follows the VPN server, the app is using the IP address. If it follows your real surroundings and ignores the VPN, it is using the device position.
Does a VPN change the GPS position my phone reports?
No. A VPN changes the network path and the public IP address that outside servers see. It does not change what the satellite receiver, nearby Wi-Fi names or mobile towers tell your device. An app that has permission can still read the device position while the VPN is on.
Why does an app show a different place each time I test?
Several things can cause that: a cached result from earlier, a location database that disagrees with itself, the app updating its position only when it is opened, or a permission setting that changed between runs. Recording the exact conditions of every run makes these differences easy to spot.
Is it all right to fake my location to test an app?
Developers testing their own app can use the simulated-location tools described in their platform's documentation. Faking a position on a service you do not own can break its rules and may lead to a blocked account, so this guide sticks to observing what an app does rather than changing what it sees.
References
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Need a VPN for a short trip or a busy month?
XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.
See passesKeep reading

Privacy Guides
Can Browser Geolocation Override the Country of Your VPN Server?
A VPN changes the address a site sees. The browser location prompt is a separate channel that your device answers. Here is how the two fit together.
10 min read

Device Guides
Why Do Some iPhone Apps Keep Using Cached Location Data After Connecting a VPN?
You connect a VPN on your iPhone, yet one app still behaves as if you were in your old place. Cached location data and device signals are often the reason. Here is how to tell the causes apart.
11 min read

VPN Security
How IP Geolocation Databases Affect VPN Locations
A VPN address is placed on the map by commercial databases, not by the VPN app. Learn how those databases work and why websites disagree about your location.
9 min read