Google geolocating me to Saudi Arabia

This is a weird one. Bear with me.

I have a Mirotik router. It connects to the Internet. It’s a pretty standard PPPoE Client connection with NAT back to the internal networks. I’ve barely touched the config in a decade or so since it’s been running. Happy to take questions on this, but it’s a pretty boring config.

If I do a traceroute from my desktop, the first hop is the router itself on the default gateway IP, and the second hop is whatever my ISP’s default gateway is. Totally normal.

My problem is - about a week or two ago Google decided I was in Saudi Arabia. I am not in Saudi Arabia. I’m in New Zealand. Every device in the office is affected, including in incognito mode (without any location data shared). The net result is all my ads are in Arabic, if I search Google shopping it gives me prices in Riyal, if I search for “car insurance” it suggests Saudi companies. It’s pretty annoying.

Presumably related - my desktop (running Windows 11) has been giving me Saudi weather for several months now. I have just ignored this as a glitch in the matrix, but suddenly it bears relevance.

My first inclination was to blame my ISP, or someone they deal with (APNIC, IANA, etc.). I had a chat with them, they did some testing, etc. As is to be expected they blamed everyone else except themselves. Since it’s happening on all computers/devices the only common part in my control is the router. They did supply me a router when I signed up a decade ago - it was still in the box. As part of their elimination process I got it out and plugged it in. Traceroutes are identical (other than the first hop is on a different subnet of course) - but Google suddenly knows I’m in NZ.

What the heck?

I’ve checked my Mikrotik config line-by-line, as well as getting ChatGPT/Claude to double/triple-check me and there’s nothing we can spot there. The default route is the ISP’s gateway (the same as with the other router). There are no VPN clients, there’s no proxies. If I go to any of the “what is my IP” sites, everything shows the correct external (static) IP. I’ve tried the ISP’s DNS servers, Cloudflare, Google - all the same results. As best I can tell, all traffic is routing to the right place, via the right route - but Google is convinced I’m in Saudi Arabia instead of New Zealand.

I know just enough about networking to be completely stumped. Requests should look identical to any remote server irrelevant of the router, right?

I’m running RouterOS v6.49.19 (I think only updated on October 16, so maybe that’s a clue?) on an RB3011UiAS. The other router that Google likes more is a FritzBox 7490.

Any ideas? I’m happy to share chunks of config by request (though would rather not dump my entire router config to the Internet).

It’s very unlikely to be anything that you are doing. More likely the IP address your ISP is giving you is incorrectly registered with the IP geolocation services. Perhaps they bought a new block of addresses that was used somewhere else.

Check your IP address at a site like https://www.whatismyip.com/.

Is the location correct there? If not notify your isp and have them fix it. The various geolocation services have ways to notify them of issues, but they usually want the address owners, not customers.

See for example:
https://www.whatismyip.com/ip-address-geolocation-incorrect/
https://support.google.com/websearch/workflow/9308722?hl=en

1 Like

It's very typical in the ISP world to "bind" an IP address to a client's MAC address, even if they use PPPoE

A probable mechanism for your reported "works with the other router", is:

A -- some time ago, the address (or CG-NAT Mapping to your router's address) was changed
B -- when you dusted off the old router, the lease to the Mikrotik was still active.
therefore their system allocated a -different- IP address to your Fritz7490
(or mapped to a different public pool via CGNAT)

And voilá: equivalent configuration on both routers, but different geolocation outcomes.

It’s very unlikely to be anything that you are doing. More likely the IP address your ISP is giving you is incorrectly registered with the IP geolocation services. Perhaps they bought a new block of addresses that was used somewhere else.

Check your IP address at a site like https://www.whatismyip.com/.

Is the location correct there? If not notify your isp and have them fix it. The various geolocation services have ways to notify them of issues, but they usually want the address owners, not customers.

Yes, I’ve checked a few similar sites and they all show my static IP correctly. Geolocation tools all point to various places in NZ which are close enough.

Worth noting that this is a static IP address, the same address was showing when I used the other router which did not give me Arabic Google.

It's very typical in the ISP world to "bind" an IP address to a client's MAC address, even if they use PPPoE

A probable mechanism for your reported "works with the other router", is:

A -- some time ago, the address (or CG-NAT Mapping to your router's address) was changed
B -- when you dusted off the old router, the lease to the Mikrotik was still active.
therefore their system allocated a -different- IP address to your Fritz7490
(or mapped to a different public pool via CGNAT)

And voilá: equivalent configuration on both routers, but different geolocation outcomes.

It’s definitely the same IP. It’s a static IP. No CGNAT or anything. I even have Nagios watching the connection for me - when I’ve swapped routers it emails me to tell me I’ve disappeared, then a moment later that I’m back, and the reverse when I flip routers back.

Definitely no CGNAT involved. My ISP does this on mobile and may or may not do it on home user broadband plans, but do not do it on business plans (particularly when they include a static IP)

Google converted to Islam. Don't worry about it, these are typical American corporate pranks. They also tell me that I'm in the middle of nowhere. The funniest thing is that I can't do anything about it, ahahaha.

When the obvious yields nothing, it may be time to look at the random. I think we are down to looking for any differences between the behaviour of the 2 routers which can lead to this discrepancy, even if the route to a cause is not obvious.

Is either of the routers doing IPv6 and the other only doing IPv4?

1 Like

It for sure has nothing to do with your MikroTik router or its configuration, unless of course you have configured a VPN to redirect your traffic via some other place.

So your problem only exists with Google products?

It sounds from your quote above that you get a different IP address when you use the other router. It is possible Google has this IP Geolocated differently.

Some other things that affect localization could be:

  • DNS servers. Were they the same with both routers?
  • IPv6. Live pointed out above do both routers support IPv6?
  • Any host localization settings.

I haven’t seen any way to directly query Google for IP geo, but you can go to the web version of google maps and search for “my current location”.

But even if it was, how would this behaviour change when I swapped routers (but kept the same static IP)?

When the obvious yields nothing, it may be time to look at the random. I think we are down to looking for any differences between the behaviour of the 2 routers which can lead to this discrepancy, even if the route to a cause is not obvious.

Is either of the routers doing IPv6 and the other only doing IPv4?

I’m pretty sure both are IPv4 only. Certainly if I look at what IP address Chrome is using to load Google it’s IPv4 in both cases.

It for sure has nothing to do with your MikroTik router or its configuration, unless of course you have configured a VPN to redirect your traffic via some other place.

Me too, but how does swapping the router to another one fix it? It makes no sense, I’m quietly going insane over here.

So your problem only exists with Google products?

Like I said in the OP, the other wee oddity is Windows has been giving me the weather from Riyadh for months. I’m not sure where this originates, but I’d presume not with Google. Other than that, everything appears as I would expect.

It sounds from your quote above that you get a different IP address when you use the other router. It is possible Google has this IP Geolocated differently.

I do not. It’s the same static IP that I’ve had for a decade on both routers.

Some other things that affect localization could be:

  • DNS servers. Were they the same with both routers?

The DNS relay in the router isn’t used, so by default I’m using my ISP’s DNS servers on both. I’ve also tried Google and Cloudflare DNS with no difference.

  • IPv6. Live pointed out above do both routers support IPv6?

This is it! Moderately embarrassed I didn’t figure this out, but that’s the difference. The Mikrotik does not have IPv6 enabled, the Fritzbox does. I disabled IPv6 on the Fritzbox, and immediately saw the same symptoms.

This obviously doesn’t solve my underlying issue, but it does mean the issue isn’t with my equipment - it has to be something between my ISP and Google.

  • Any host localization settings

I haven’t seen any way to directly query Google for IP geo, but you can go to the web version of google maps and search for “my current location”.

It’s pretty obvious when it thinks you’re somewhere else. Bottom corner of google.com says the country it thinks you’re in. It also tells you what other languages from your country it’s offered in (so should say Māori for me, but has Arabic instead). And searching for “hotels” or similar shows “local” results.

Great, it sounds like youre making progress.

Try contacting google support [https://support.google.com/websearch/workflow/9308722?hl=en]

It may just be that someone made a mistake recently with that IP.

Maybe your MikroTik router has been hacked.

When you have not configured the firewall for ages, that may be the case. You can carefully check the export for things you do not recognize, and in doubt netinstall and reconfigure it.

Google has support? Lol. They never had and never fix anything on their side.

It seems it’s easier to enable IPv6 on MikroTik and your problem will be solved.

Add your country and city name to search what you need. I always do this with Google.

Yeah I’m getting quite good at searching, swearing, and adding “nz” to the end. Annoyingly this doesn’t work on Google Shopping though, so I can’t search for products.

None of these problems are insurmountable (“just ignore the ads” “just use DuckDuckGo” “just add NZ to your search term” “just search on your phone on 4G” “Just log into your Google account and set it to the right region”, etc., etc.) but Google’s so pervasive it just creates a whole lot of little micro-annoyances that keep popping up in unexpected ways. I’d really rather fix the underlying problem than try and hide it with a series of bandaids.

Not a bad call. I started down that track, but quit when it told me I needed to restart the router (I have an office full of staff so trying to avoid). Also the slight complication I use a different device as the DHCP server, so will need to think this through somewhat. Might take another look when I don’t have staff working.

Maybe your MikroTik router has been hacked.

See more recent posts - it happens on the other router when I disable IPv6. So unless the hackers also got into the router that’s been sitting in a box in my office for 10 years, I think we can fairly safely rule out hackers.

You can carefully check the export for things you do not recognize

This is good advice either way - as mentioned in the OP I’ve checked it line by line, and gotten ChatGPT and Claude to give a second and third opinion. They picked out a couple of things that could be improved, but overall got a clean bill of health.

Yeah I did that a few days ago - before realising it was only on one router. it’ll be interesting to see if it actually works. Also will be interesting if it fixes the weather in Windows.

Have you tried another search service? Does it classify your IP as arabian one?
If you visited any arabian country then you cookies could influence results. Try to use incognito mode for searches.
Are you logged into Goole accont with a browser? Logout for test.

Sorry, i didn’t mean to imply that google would actually be helpful but thought it might feel good to try something :wink: