Checking the Exit IP and Location of Your Rotating Proxy

To check the exit IP and location of your rotating proxy connection, send a request through the proxy to a service that echoes your IP address and geolocation. This is a standard practice for verifying that your proxy is working and targeting the correct country, state, or city. You can use public IP check websites or command line tools like curl.

Key points
  • Use websites like ipinfo.io or icanhazip.com through your proxy to see the exit IP.
  • The command `curl --proxy` is a quick way to check the IP from a terminal.
  • The reported location should match your targeting options like `cc.us` or `city.chicago`.
  • A different IP on each check confirms rotation; a stable IP confirms a sticky session.

Why Checking the Exit IP and Location Matters

Checking the exit IP and location is the most direct way to confirm your rotating proxy is configured correctly. It verifies that traffic is exiting through the intended network, residential, mobile, datacenter, or ISP, and from the geographic location you specified. This is crucial for tasks like price monitoring where local prices vary, or checking geo-restricted content. It also helps diagnose issues if a target site is blocking requests, a common concern when web scraping.

Quick Method: Using a Browser with a Proxy Extension

If you configure your browser to use the proxy, you can visit an IP check website to see the exit IP and location. First, set up the proxy in your browser settings or using an extension like FoxyProxy (see FoxyProxy setup). Then, navigate to a service such as ipinfo.io, icanhazip.com, or whatismyipaddress.com. The page will display the IP address and often the inferred country, region, and city. Compare this to your targeting options; for example, using USERNAME_net.res_cc.de should show an IP from Germany.

Reliable Method: Using curl from the Command Line

The command line tool curl provides a fast, scriptable way of checking the exit IP and location. It avoids browser caching and extra requests. Use the --proxy or -x flag with your proxy credentials and gateway. For an HTTP proxy on port 7070, the command looks like this:

curl -x "http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070" https://ipinfo.io/ip

This returns just the IP address. For more details like location, you can request the JSON output from ipinfo.io:

curl -x "http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070" https://ipinfo.io/json

You can use the SOCKS5 port 7071 as well (see which port to use). This method is ideal for automated checks or when working on a server. For more integration examples, see curl proxy setup.

Checking with Programming Languages Like Python

Within your scraping or automation code, you can insert a check to log the exit IP. In Python with the requests library, make a quick request to an IP echo service before your main tasks. Here's a simple example:

import requests

proxy = {
    "http": "http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070",
    "https": "http://USERNAME:PASSWORD@gw.rotatingproxy.cc:7070"
}

response = requests.get("https://api.ipify.org?format=json", proxies=proxy)
print("Exit IP:", response.json()["ip"])

This is part of good web scraping best practices to ensure your proxy session is alive and correctly targeted. For other languages, refer to guides like Python requests proxy or axios proxy.

Verifying Rotation and Sticky Sessions

Checking the exit IP repeatedly lets you verify the rotation behavior. If you are not using a session ID (the sid option), each new connection should get a new IP address. Run your check command twice in quick succession; you should see two different IPs, likely from the same targeted region. If you are using a sticky session with a session ID like USERNAME_net.mob_cc.us_sid.abc123, the IP should remain the same for the duration of the TTL (default 10 minutes). If the IP changes earlier, see why my session IP changed early. Understanding this is key to sticky vs rotating sessions.

What to Do If the Location Is Wrong

If the checked exit IP is from a country you did not target, first verify your proxy username string. Ensure the country code (e.g., cc.fr) is spelled correctly and is supported in your chosen network. Check the locations page for available countries per network. For city-level targeting, confirm the city token (e.g., city.paris) is from our published list. If your desired city isn't listed, see what if my city is not listed. Also, remember that IP geolocation databases are not perfect; the reported city may be an approximation. For more on this, read how accurate is IP geolocation.

Related Tools and Dashboard Features

Beyond manual checks, your RotatingProxy dashboard provides tools to manage your setup. The Proxy setup page has a string builder that helps you construct the correct username with options. The Usage page shows traffic per network and can help correlate activity with IP checks. For programmatic management, you can use the API to fetch connection details. When planning large projects, use the traffic calculator to estimate needs for use cases like rank tracking or market research.

Common Questions About IP Checks

Users often ask if the IP check traffic is billed. Yes, any traffic that goes through the gateway, including requests to ipinfo.io, counts toward your data usage and is charged from your balance according to pay as you go billing. The amount is negligible (a few kilobytes per check). Another question is whether you can check the IP of a specific proxy user. Yes, simply use that proxy user's credentials in your check. This is useful if you have set a monthly GB cap on different users for separate projects.

Questions

Can I check the exit IP without using an external website?

Not directly, as you need a service on the public internet to echo the IP your connection appears from. You could set up your own server, but using a public service is simpler.

Why does the IP display a city different from the one I specified?

IP geolocation databases used by check services may have slightly different mappings than our targeting. The IP is from the correct pool, but the reported city might be a nearby metropolitan area.

How often should I check the exit IP during a long scraping job?

It's good practice to check at the start of a session. For long-running jobs, you might check periodically, especially if using sticky sessions, to ensure the IP hasn't rotated unexpectedly.

Does checking the IP reveal my proxy usage to the IP check service?

The service (like ipinfo.io) will see the request coming from your proxy's exit IP, not your real IP. They will not know you are using a proxy service specifically.

Can I use this method to test if my proxy connection is alive?

Yes, a successful IP check confirms the proxy gateway is reachable, your authentication works, and your balance has funds. A failure indicates a setup or network issue.

What if the IP check shows my real home IP address?

This means your request is not going through the proxy. Double-check your application's proxy settings, ensure the proxy URL is correct, and verify there are no system-wide proxy settings overriding it.

Start with one top-up, use any network

Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.