> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sticky sessions and protocol for Residential Proxies

> Learn how to configure sticky sessions with custom TTL values and choose between HTTP or HTTPS protocols for ZenRows Residential Proxies.

ZenRows Residential Proxies support both HTTP and HTTPS protocols, giving you flexibility for any web scraping scenario. In addition, you can use sticky sessions (TTL) to control how long a particular IP address is assigned to your requests, which is essential for maintaining session continuity in tasks like login persistence, checkout processes, or paginated data extraction.

## Why Use Sticky TTL?

Sticky sessions allow you to:

* Maintain the same IP for a set period (from 30 seconds up to 1 day)
* Ensure session consistency for workflows that require login or multi-step navigation
* Reduce the risk of bans or captchas by mimicking real user behavior

## How to Enable Sticky Sessions

To enable sticky sessions, append the `ttl` parameter and a session ID to your proxy password in the proxy URL.

### Example: 30-Second Sticky Session

```bash theme={null}
http://<YOUR_USERNAME>:<YOUR_PASSWORD>_ttl-30s_session-1cLiFzDgsq36@superproxy.zenrows.com:1337
```

<Frame>
  <img src="https://static.zenrows.com/content/res_proxy_protocol_stickyttl_2aada7c68a.png" style={{ borderRadius: '0.5rem' }} alt="res_proxy_protocol_stickyttl" />
</Frame>

* `ttl-30s` ensures the IP will be retained for 30 seconds.
* `session-1cLiFzDgsq36` is a random session identifier that you can generate yourself. You can use any combination of letters and numbers, similar in length and style to the example. This allows ZenRows to allocate the same IP for multiple requests as long as you use the same session ID.

### Available Sticky TTL Values

* **30 seconds:** `ttl-30s`
* **1 minute:** `ttl-1m`
* **30 minutes:** `ttl-30m`
* **1 hour:** `ttl-1h`
* **1 day:** `ttl-1d`

<Info>
  The session ID is a random string that uniquely identifies your session and must be generated manually, or on the Residential Proxy Dashboard
</Info>

## Best Practices

* Use sticky sessions for login-required flows, shopping carts, or any scenario where the same IP is needed across requests.
* Choose the shortest TTL that meets your needs to maximize IP pool rotation and avoid detection.
* Always generate a unique session ID for each session to prevent conflicts.

## Troubleshooting

* If you observe frequent IP changes, double-check your TTL and session ID format.
* Some websites may require longer TTLs for certain workflows; experiment with different values to find the best fit.

<Note>
  Learn more about session management and advanced proxy features in the [ZenRows Proxy documentation](/universal-scraper-api/features/premium-proxy).
</Note>
