Skip to content
Guides

Sticky Sessions on GlobProxy: Keep the Same IP, Step by Step

·6 min read

A rotating session gives every connection a new IP. A sticky session does the opposite: it holds one exit IP for a time you choose, so a login, a multi-step checkout or a long browsing session all look like they come from one place. This guide is the hands-on companion to our explainer on choosing between the two. It covers how to create a sticky session, how named sessions let you hold many different IPs at once, and what to do when an IP changes when you did not expect it to.

Throughout, a session means one set of proxy credentials with its own GB allocation, listed under My Proxies. A named session is a fixed endpoint inside a sticky session, described below.

How stickiness actually works

There is nothing to switch on at the connection. The stickiness is carried by the username you connect with. A sticky username ends with two extra parts:

text
gp_3f9a1c7e2b8d4a6f0c15-type-residential-country-us-state-texas-city-austin-lifetime-60-session-Ab3dE9xQ
  • →-lifetime-60 is how long, in minutes, the IP should be held.
  • →-session-Ab3dE9xQ is an identifier. Connections that use the same identifier within that window are routed to the same IP. A different identifier gets a different IP.

That is the whole mechanism, and it explains most behaviour you will see. Keep the identifier and you keep the IP. Change the identifier and you get a new IP. Because the identifier lives in the username, you can generate as many as you like without creating anything on our side, and a named session is simply a saved identifier with a label, so you can find it again.

Sticky sessions use their own ports. With HTTP / HTTPS it is 10000, and with SOCKS5 it is 12000, against 9000 and 11000 for rotating. The Credentials tab always shows the right one for your session, so copy it from there.

Step 1: Create a sticky session

  1. 1Open My Proxies and choose New session.
  2. 2Under Location, pick the country, and a state and city if you need them.
  3. 3Under Protocol & session type, choose Sticky ("Same IP per session"). A Sticky duration row appears.
  4. 4Choose how long to hold the IP: 1 min, 10 min, 30 min, 1 hour, 6 hours, 12 hours or 24 hours, or Custom for any number of minutes from 1 to 1440. The default is 10 minutes.
  5. 5Set GB to allocate and create the session.

Already have a rotating session? Open its Edit tab, change IP behaviour to Sticky, choose a duration and save. The port changes with it, so copy the connection details again afterwards. Your bandwidth is not affected.

Choosing a duration

TaskReasonable starting point
A single login and a few actions10 to 30 minutes
A checkout or form with several steps30 to 60 minutes
Working in an account for a session or an afternoon6 to 12 hours
A long-running identity for the day24 hours (the maximum)

Longer is not automatically better. Residential IPs belong to real connections, so one can drop out before your window ends, and you gain nothing from asking for 24 hours on a five-minute job. Pick the shortest window that covers the task.

Step 2: Get a sticky endpoint

On a sticky session, the Credentials tab shows a ready-made example username, and the copy button on the session row copies a complete sticky endpoint. That example is derived from the session, so it stays the same every time you open the page and never moves your IP on a reload. It is fine for a quick test, but for real work use named sessions.

To test it, run the same request twice through one endpoint:

bash
PROXY="http://YOUR_STICKY_USERNAME:YOUR_PASSWORD@proxy.globproxy.com:10000"
curl -s -x "$PROXY" https://ipinfo.io/ip; echo
curl -s -x "$PROXY" https://ipinfo.io/ip; echo

Both lines should print the same IP. Run the same two commands with a different session identifier at the end of the username and you should see a different one.

Step 3: Named sessions, one fixed IP each

If you run several accounts or browser profiles, you want each to keep its own IP. That is what named sessions are for.

  1. 1Open the sticky session and go to the Sticky sessions tab.
  2. 2Choose + new session. The dropdown beside it lets you make 1, 5, 10 or 25 at once.
  3. 3Each one appears in the list with a label such as Session 1, and its own complete endpoint. Click the label to rename it, for example to the account it belongs to.
  4. 4Use copy for one endpoint, or copy all and .txt for the lot. The downloaded file contains the password, so treat it like one.

Every named session has its own identifier, so each holds its own IP, and they all draw from the same GB allocation as the session they sit in. The star pins one to the top of the list, and the arrow hides or shows its endpoint line. Limits: 25 can be created in one go, and up to 200 live named sessions can exist per sticky session.

Rotating sessions have no named sessions

Named sessions exist only on sticky sessions. If you open a rotating session you will not see the tab, and the API refuses to create them on one. That is by design: a rotating endpoint already gives every connection its own IP.

Getting a fresh IP

You wantDo this
A new IP for the same jobCreate a new named session and use its endpoint. It has a new identifier, so it gets a different IP.
To stop using a named sessionRemove hides it from your list. The IP is not released early and simply expires when its window ends.
To free up its slot completelyDelete. You are asked to confirm, and it stops being listed. Point any job that still used it at another session first.
A different locationEdit tab on the session, then copy the username again. See our guide on changing a session's location.

Removed sessions are kept out of sight for about a week and then purged automatically, so there is nothing to clean up. They do count towards a stored-session ceiling in the meantime, which you will only ever reach if you create and remove very large numbers.

Using named sessions in code

Paste one endpoint per worker or per account. A Python example that gives each account its own IP:

python
import requests

# One endpoint per account: host:port:username:password
ENDPOINTS = {
    "account_a": "http://USERNAME_A:YOUR_PASSWORD@proxy.globproxy.com:10000",
    "account_b": "http://USERNAME_B:YOUR_PASSWORD@proxy.globproxy.com:10000",
}

for name, proxy in ENDPOINTS.items():
    s = requests.Session()
    s.proxies = {"http": proxy, "https": proxy}
    ip = s.get("https://ipinfo.io/ip", timeout=30).text.strip()
    print(name, ip)  # each account keeps its own IP while its window lasts

USERNAME_A and USERNAME_B are the full sticky usernames of two named sessions. They share everything except the final identifier. API users can create named sessions with POST /api/v1/sub-users/:id/sessions, described in the API reference.

When the IP changes, or does not

What you seeLikely causeWhat to do
A new IP on every requestYou are on a rotating session or the rotating port, or the identifier is different on each request.Confirm the session is Sticky, the port is 10000 or 12000, and the username ends in -lifetime-…-session-…, with the same identifier every time.
The IP changed after the time you setThe window ended. The same identifier can be given a new IP afterwards.Choose a longer duration on the Edit tab, or create a new named session when you want a deliberate change.
The IP changed before the window endedA residential IP can go offline, because it belongs to a real device. The identifier is then given another IP.Retry the request. For anything fragile, handle a mid-session change in your code and use a shorter job per IP.
Two accounts share one IPThey are using the same session identifier.Give each account its own named session.
All named sessions changed after I edited the sessionDuration, location and protocol belong to the sticky session, not to each named session. Changing them changes every username.Copy the endpoints again after editing and update anything still using the old ones.
Nothing connects on a sticky portWrong port for the protocol, or the session is still warming up.Use 10000 for HTTP or 12000 for SOCKS5, and allow the first few minutes after activation.
Cannot create more named sessionsYou hit the 200 live limit, or the 25-at-once limit.Delete sessions you do not use, or create in batches of up to 25.
Check the exit location too

A sticky IP is only as good as its location. If the country or city looks wrong, widen the targeting first. A narrow city, or a narrow ISP, has a smaller pool to choose from and is the usual cause of both slow connections and surprise changes.

Frequently asked

How long can a sticky IP be held?
You choose, from 1 minute to 24 hours (1440 minutes). The default is 10 minutes. Set it when you create the session, or change it later on the Edit tab.
Do named sessions cost extra bandwidth or money?
No. They are saved identifiers that draw on the same GB allocation as the sticky session they belong to. There is no separate charge for creating them.
Can I change the duration of one named session on its own?
No. The duration belongs to the sticky session and applies to all of its named sessions. If you need two durations, create two sticky sessions.
Can I switch a rotating session to sticky later?
Yes. Use the Edit tab. The port changes, so copy the connection details again. Your GB are untouched.
What happens to a named session when its time runs out?
The hold ends, so the IP is no longer reserved for that identifier. The named session stays in your list, and connecting with it again starts a new window, which may land on a different IP.
How many fixed IPs can I hold at once?
Up to 200 live named sessions per sticky session, each with its own IP, and you can have more than one sticky session.

Still stuck?

Email us at support@globproxy.com and include your account email and what you see on screen.

Contact support →