TL;DR: To rotate proxies automatically in a browser, route the session through a pool of residential IPs and let the infrastructure assign a fresh address instead of pinning one. On Browserbase you do this by setting proxies: true when you create the session. Every session gets a managed residential IP, so a long-running agent keeps reliable access without you writing rotation logic, buying a proxy list, or restarting the browser. This guide shows the built-in path, custom pools, geo-targeting, and per-domain routing, all copy-paste ready.
Rotating proxies matters because a browser that sends every request from one IP looks nothing like real traffic. Sites rate-limit or block that address, and your automation stalls. Rotating the IP spreads requests across many addresses so each one stays under the radar and your agent keeps working. For the concept itself, see what a proxy is for browser automation.
What does it mean to rotate proxies automatically?
Automatic proxy rotation means the browser draws each outbound request, or each new session, from a pool of IP addresses instead of a single fixed one, and something other than your code decides which IP to use. A rotating proxy service sits between the browser and the internet, hands out a different address on a rotation policy, and retires addresses that start failing.
The alternative is a static proxy, one IP held for the life of a session. Static is right when a site ties your login or cart to a stable address; rotating is right when you make many requests and want them spread across addresses. Most browser automation wants rotation.
How do you rotate proxies automatically with built-in proxies?
Set one flag. Passing proxies: true routes the session through Browserbase's managed residential proxies, which assign and rotate the IP for you. There is no proxy list to buy, no rotation loop to write, and no restart to force a new address. This is the fastest way to get automatic rotation.
Connect your automation to that session over CDP as usual, and every request leaves through a rotating residential IP. Proxy usage is billed by data transferred, and each proxied session has a 1 MB minimum, so route only the traffic that needs a proxy.
How do you rotate proxies from a specific country or city?
Pass an array of proxy rules with a geolocation instead of the bare true. The pool still rotates addresses automatically; you are narrowing which addresses it draws from. Use the broadest geography that meets your need, a country before a city, because a wider area means more IPs to rotate through and better results. Browserbase supports 200+ countries.
Geolocation routing is best effort. If no proxy exists in the exact location, the closest one is used, so a request tagged to a small city may resolve to a nearby region.
How do you rotate through your own proxy pool?
Point the session at your own rotating endpoint with an external proxy rule. Most commercial providers expose a single gateway host that rotates the exit IP on their side, so the browser connects to one endpoint and the provider hands out a fresh address per request. Your credentials and rotation policy live with the provider; Browserbase just routes the session through them.
Browserbase validates the proxy connection at session creation, so a wrong host or bad credentials fails fast with an error instead of silently sending unproxied traffic. Not every provider is supported; test yours before you depend on it.
How do you route different sites through different proxies?
List several proxy rules with domain patterns. Rules are evaluated in order and the first match wins, so you can send one domain through a custom pool, another through Browserbase's rotating proxies, and exclude a third from any proxy. End with a bare browserbase rule to catch everything else, or leave it off to send unmatched domains direct.
To skip proxying for specific domains, list them first with type: "none" and a domain pattern, then add your catch-all rule after. Those domains go direct while the rest rotate.
How do you rotate proxies when an agent drives the browser?
The proxy config is a session setting, so it works the same whether you drive the browser with raw CDP or hand it to an agent. With Stagehand, pass proxies: true when you launch the Browserbase browser and the agent's requests rotate automatically. You write automation logic; rotation stays in the infrastructure.
When is rotating proxies not enough?
Rotation solves IP-based rate limits, but some sites check more than the address. When a site inspects the browser itself and asks agents to prove they are allowed in, a fresh IP alone will not get you through. That is what Verified is for: it gives agents verified access to protected sites, and it pairs with proxies rather than replacing them.
The practical rule: reach for proxies when the problem is location or request volume, and add Verified when the problem is access to a protected site. Some sites need only one, some need both, so test your target with each combination. Note that built-in residential proxies use third-party providers whose acceptable-use policies restrict some high-risk categories, so confirm your site works before relying on it.
Rotate proxies without managing proxies
Automatic rotation should be a flag, not a project. Built-in proxies give a long-running agent fresh residential IPs with proxies: true, geo-targeting and per-domain routing when you need them, and Verified alongside for sites that check more than the IP. Start from the proxies documentation, and if you are still choosing a provider, compare options in our guide to the best proxies for web automation.
Start building with Browserbase
Run headless browsers for your agents and automations at scale. Get started free in minutes.
