Black Friday
More data + extra crypto balance
Back to all articles
Features

Static IP Session Proxies: Keep The Exact Same IP With Strict Session

Need to keep the exact same IP for a whole session? How Rainproxy strict session works, the -strict-true token, what happens when the IP goes offline and limits.

6 min read
Share
Static IP Session Proxies: Keep The Exact Same IP With Strict Session

A normal sticky session tries to keep your IP, but if the device behind it goes offline, your traffic quietly continues on a different IP. For most tasks that is the right choice. For some, a silent IP change is worse than an error. Strict session is built for those cases: one exact IP for the whole session, and a clear failure if that IP is no longer available.

What strict session does

Strict session keeps a sticky session on one exact IP for its whole duration. If that device goes offline, requests fail with a clear error instead of silently switching to a new IP. To get a new IP, you start a new session ID.

Strict sessions use only checked IPs in the exact country you chose. VPN- or datacenter-flagged and blacklisted IPs are excluded.

When you need the exact same IP

  • Checkout flows where a new IP halfway through is a problem.
  • Long logins and dashboards that tie your session to one address.
  • QA and testing sessions where you need to know every request came from the same exit.
  • Ad verification journeys that must be followed from start to finish on one IP.

If an IP change in the middle of your flow is harmless, a normal sticky session is simpler. See our guide to sticky session proxies.

How to set it up at Rainproxy

Strict session needs a sticky session, so start with a session ID and sticky time, then add -strict-true after the session:

user-country-us-session-abc123-time-30-strict-true

strict = true requires a session; it does not work on its own.

You can also switch on Strict session (exact IP) in the dashboard Generator under Advanced settings.

Strict session works on ports 1111 (HTTP), 2222 (SOCKS5) and 3333.

What happens when the IP goes offline

Residential IPs belong to real devices, and devices disconnect. With strict session, Rainproxy does not hide that from you:

  • HTTP: the request returns 502 with the header x-proxy-error: strict-session-unavailable.
  • SOCKS5: the reply is 0x04.

Your code can check for these and decide what to do — for example, stop the flow, log it, or start again with a new session ID to get a new IP.

The first request takes a few seconds

The first request of a strict session takes a few seconds longer while the device is verified. Plan for that in your timeouts, especially in automation that starts many sessions at once.

Which products have it

Strict session is available on:

It works together with sticky sessions on both. See the strict session section on the features page for a short overview.

A worked example

Say your test suite walks through a checkout and must know that every step used one exact IP. Use a strict session with a sticky time that covers the whole run:

user-country-us-session-run42-time-30-strict-true

In your client, treat an HTTP 502 with x-proxy-error: strict-session-unavailable (or a SOCKS5 reply 0x04) as a signal that the exact IP is gone. Mark the run as interrupted, then start again with a new session ID, for example run43, which gets a new IP. You never end up with a run that silently changed IP halfway.

Common setup mistakes

  • Leaving out the session. -strict-true only works after -session-<id>.
  • Tight timeouts on the first request. The first request of a strict session takes a few seconds longer while the device is verified. Allow for it.
  • Retrying on the same session ID after a failure. If the exact IP is unavailable, a new session ID is how you get a new IP.
  • Wrong product or port. Strict session applies on Premium Residential and Exclusive Residential, on ports 1111, 2222 and 3333.

How to check it is working

Send a request every minute to an IP information page with the same strict session and confirm the IP never changes. If you ever get the 502 or 0x04 error instead, strict mode is doing its job.

Honest limits

  • It cannot keep a device online. Strict session prevents a silent switch; it does not mean the IP stays available. When the device goes offline, requests fail by design.
  • A session is still required. Without -session-<id>, strict mode is not applied.
  • A short wait at the start. The first request takes a few seconds longer while the device is verified.
  • No promise about any specific site. We do not promise results on any named website or app.

Getting started

The free trial includes 250 MB in total — 125 MB of Premium Residential and 125 MB of Exclusive Residential — claimed through live chat, so you can test strict sessions on both products. Plans are on the pricing page.

Try it yourself

Spin up your first session in 60 seconds.

250 MB on us, activated by our team in live chat. No credit card. Real residential and mobile IPs across 195+ countries.

Talk to sales