Glossary
Sticky session: holding one exit IP while you work
A sticky session is a proxy setting that keeps your requests on the same outgoing IP for a fixed time or until you ask for a new one.
Definition
Rotating proxy networks can either change the exit on every connection or hold it steady. The steady mode is called a sticky session. You usually turn it on by adding a session id to the proxy username, for example customer-abc-session-7f3k. As long as you send the same id, the gateway routes you through the same exit, until the provider's maximum duration runs out or the device behind the exit goes offline.
Durations differ by provider and pool type. Ten to thirty minutes is common for residential pools; ISP and datacenter addresses are often static anyway, so they behave as one endless sticky session.
Why sessions need one IP
Websites remember visitors by more than cookies. Many store the IP alongside the session record and raise a flag when it changes. A login that started in one city and continues from another a second later looks like a stolen cookie. Carts empty, accounts sign out, and checkout pages ask for verification again.
Anything multi step belongs inside one sticky session: logging in, paging through search results with a server side cursor, filling a multi page form, or completing a purchase on your own test store.
Why a CAPTCHA answer should be used from the same IP
This is the part that costs the most debugging time. Several challenge types bind the answer to the network that produced it:
- Cloudflare Challenge returns a
cf_clearancecookie that is valid only from the IP used during the solve, together with the returned User-Agent. - DataDome Slider returns a
datadomecookie tied to the same IP and User-Agent. - Token widgets such as reCAPTCHA can be checked against the submitting address on sites that enable stricter verification. For those, the proxy variant of the task keeps solve and submit on one network.
If your proxy rotates between the solve and the next request, the answer is correct but arrives from the wrong address. The site rejects it, and it looks as if the solve failed. The why is my token rejected answer lists this as one of the first things to check.
Setting it up with GateSolver
The proxy itself is yours, not ours: GateSolver has no proxy product. You create the sticky session with your provider, then use that exact proxy string twice: once in the task and once in your own client.
const sess = "s" + Date.now().toString(36);
const proxy = `http://acct-${sess}:pw@gate.provider.example:7000`;
const created = await post("/createTask", {
clientKey: "YOUR_API_KEY",
task: { type: "AntiCloudflareTask", websiteURL: target, proxy },
});
// poll /getTaskResult every 3 s, then fetch target through the
// same proxy string with solution.userAgent and cf_clearance
Choose a session lifetime longer than solve time plus the work you plan to do with the cookie. A token task typically finishes under 9 seconds; leave a comfortable margin above that.
Related reading: rotating proxy for the opposite mode and cf_clearance for the cookie itself.
Common questions
How long does a sticky session last?
It depends on the provider and pool; residential pools commonly hold an exit for about ten to thirty minutes, while static ISP IPs never rotate.
How do I start a new sticky session?
Change the session id in the proxy username. The gateway treats a new id as a new session and picks a fresh exit.
Why was my cf_clearance cookie refused?
The usual cause is a different IP or User-Agent from the ones used during the solve. Keep both identical for every request that carries the cookie.
Do proxyless tasks need a sticky session?
No. Proxyless tasks are solved from our network, so only your own browsing needs session stability on those.
Can the exit change even with a sticky session?
Yes. If the device behind the exit disconnects, the provider routes you elsewhere, so watch for sudden failures after a long stable period.
Keep reading
- Rotating proxyA rotating proxy hands out a new exit IP per request or per time window through one gateway address you configure once.
- cf_clearance cookieThe cookie Cloudflare sets after a passed challenge, why it only works from one IP and user agent, and its lifespan.
- Rotating or sticky proxies for form flows?Multi-step forms need sticky sessions so the IP stays put; rotation suits independent page fetches with no shared state.
- Why does the site reject my solved token?Rejected tokens usually trace back to a wrong site key, stale timing, a missing action or a mismatched browser session.