What are Cellular and Wi-Fi connections, and how do I identify them?

A cellular IP address is one assigned by a cellular carrier (Verizon, AT&T, T-Mobile, etc.), and the connection is made via the cell tower itself. These are also sometimes referred to as 3G or 4G connections. The GeoIP2 Connection Type database identifies cellular IP addresses. The GeoIP ISP database identifies who the carrier is.

Wi-Fi is a method of wirelessly connecting to a local area network (LAN), and is independent of any IP address that might be assigned to that LAN–a Wi-Fi connection could be made to a wireless router that is connected to a broadband model or a cellular connection (such as a “mobile hotspot”). It is not possible to identify a connection that uses Wi-Fi with only the IP address.

For supported browsers, checking both the JavaScript navigator.connection property and the GeoIP2 Connection Type database can help identify if the user is connecting via a mobile hotspot. If navigator.connection returns “wifi”, and GeoIP2 Connection Type returns “Cellular”, then mobile Wi-Fi is likely being used.