Full Setup Guide

How to Set Up a Rotating Proxy

Setting up a rotating proxy means getting a fresh exit IP on every request, so your traffic spreads across many addresses instead of hammering a target from one. There are two ways to do it: the easy way, where a managed gateway handles rotation for you and you set a single proxy line, and the hard way, where you collect and manage a list of IPs and write the rotation logic yourself. This guide covers both, with copy-paste examples for cURL, Python requests and Scrapy, so you can be rotating in minutes.

New IP per request   One proxy line   HTTPS & SOCKS5

New IP every request cURL, Python, Scrapy One gateway endpoint No rotation code Since 2014

What setting up a rotating proxy involves

At its core, a rotating proxy setup has three moving parts. First you need a supply of IP addresses to rotate through. Second you need something that picks a different IP for each request and routes your traffic out through it. Third your client has to send its requests through that proxy layer rather than directly. How much work this is depends entirely on who owns the second part. If you own it, you are collecting IPs, checking which are alive, distributing requests across them, retrying when one dies, and handling authentication and protocols for each, which is a real engineering project. If a managed gateway owns it, all three parts collapse into a single endpoint: you point your client at one host, the gateway picks a fresh IP per request, and there is no rotation code to write. The rest of this guide shows the easy, managed path in full, then explains the do-it-yourself path so you can see exactly what the gateway is doing for you. To go deeper on the concept itself, see what is a rotating proxy.

The easy way

Set up rotation with a managed gateway

The gateway rotates for you, so setup is one proxy line. Here is the whole thing in four steps with real code.

1. Get a rotating gateway

Create an account and choose a plan on the pricing page. There is one unified plan that includes every proxy type and both rotating and sticky modes at the same price, from $24.95/mo with metered bandwidth. Once active, open your dashboard to find your gateway host, port and credentials. The host is gateway.proxyrotator.com and the port is 8080.

2. Enable rotating mode (and pick a type and location)

In your dashboard, set the mode to rotating so the gateway hands out a new IP on every request. While you are there, choose the proxy type, residential, datacenter, mobile or IPv6, and the country or city you want to appear from. Type, location and rotation are all configured at the gateway, not via URL parameters, so your client code never changes when you adjust them. With 195+ countries available, you target precisely without switching plans.

3. Point your client at the gateway

Set a single proxy line in whatever client you use. The gateway already rotates, so there is nothing else to configure. Connect over HTTPS or SOCKS5; there is no plain-HTTP node.

cURL
curl -x https://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org
# run it again and you exit from a different IP
Python (requests)
import requests

proxies = {
    "http":  "https://USER:PASS@gateway.proxyrotator.com:8080",
    "https": "https://USER:PASS@gateway.proxyrotator.com:8080",
}
for _ in range(5):
    r = requests.get("https://api.ipify.org", proxies=proxies, timeout=20)
    print(r.text)   # a different IP on each call
Scrapy (DOWNLOADER middleware)
# middlewares.py
class ProxyRotatorMiddleware:
    PROXY = "https://USER:PASS@gateway.proxyrotator.com:8080"

    def process_request(self, request, spider):
        request.meta["proxy"] = self.PROXY

# settings.py
DOWNLOADER_MIDDLEWARES = {
    "myproject.middlewares.ProxyRotatorMiddleware": 350,
    "scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 750,
}

The Scrapy middleware sets the proxy once for every request, and the gateway rotates the exit IP per request automatically. No scrapy-rotating-proxies package is needed. See the full Scrapy integration for whitelist auth and verification.

4. Verify rotation

Before running a real job, confirm the IP actually changes. Send the same request twice and compare the exit IPs. In rotating mode they should differ.

verify (cURL)
curl -x https://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org
curl -x https://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org
# two different IPs means rotation is working

Prefer not to embed credentials? Whitelist your server IP in the dashboard and drop the USER:PASS@ part. For more Python patterns, see how to rotate your IP in Python.

The hard way: managing IP lists yourself

You can build rotation by hand, and it is worth understanding what that takes so you can judge whether it is worth your time. The do-it-yourself path starts with sourcing IPs, either buying or renting a block of proxies or scraping a public list, and immediately runs into the fact that many of them will be slow, already blocked, or simply dead. So your first job is a health check: probe each IP, drop the ones that fail, and keep re-checking because a working proxy today can be banned tomorrow. Next you write the rotation logic itself, picking the next IP for each request, whether round-robin, random, or weighted by past success, and threading that selection through every request your code makes. Then you handle failure: when a request errors or times out, you retry it on a different IP, and you have to decide how many times before giving up and whether to retire the failing IP. On top of that sits authentication and protocol handling, because different proxies want different credentials and speak different protocols, and you have to normalize all of it. Finally you maintain the whole thing forever, replacing dead IPs, rebalancing load, and watching for sites that start blocking your ranges. None of this is your actual product; it is plumbing. The managed gateway exists precisely to absorb all of it, which is why the easy way above is a single proxy line and this section is a paragraph of warnings. If you are evaluating a free source first, our honest free proxy list page explains why free proxies rarely hold up for real jobs.

Easy vs hard

Managed gateway vs your own IP lists

Both reach the same goal, a new IP per request. One is a proxy line; the other is an ongoing engineering project.

PropertyManaged gatewayManage IP lists yourself
Rotation logicHandled at the gatewayYou write and maintain it
Dead-IP handlingAutomatic on our sideYou probe, retry and replace
Client setupOne proxy lineSelection threaded through code
Auth & protocolsOne scheme, HTTPS or SOCKS5Varies per source
Geo & type targetingSet in dashboardSource-dependent, often none
Ongoing maintenanceNone on your endContinuous
FAQ

How to Set Up a Rotating Proxy FAQ

What does it mean to set up a rotating proxy?
It means arranging things so your traffic exits from a different IP on each request. That requires a supply of IPs, a layer that picks a fresh one per request, and a client that routes through it. With a managed gateway all three collapse into one endpoint, so setup is a single proxy line.
How do I set up a rotating proxy quickly?
Create an account, enable rotating mode in your dashboard, and point your client at gateway.proxyrotator.com:8080 over HTTPS or SOCKS5. The gateway rotates the exit IP per request, so there is no rotation code to write. See pricing to get started.
Do I need to write rotation code?
No. With the managed gateway, rotation happens on our side. You set one proxy line and every request exits from a new IP. You only write rotation logic yourself if you choose the hard path of managing your own IP lists.
How do I set up a rotating proxy in Python?
Put the gateway URL in a proxies dict and pass it to requests. Each call exits from a new IP because the gateway rotates. For more patterns, including session reuse and retries, see how to rotate your IP in Python.
How do I set up a rotating proxy in Scrapy?
Set the proxy once in a small downloader middleware that assigns request.meta["proxy"], and enable it in settings.py. The gateway rotates the exit IP per request, so no extra rotation package is needed. The full Scrapy integration covers it.
Can I set up rotation with cURL?
Yes. Pass the gateway with -x https://USER:PASS@gateway.proxyrotator.com:8080 and run your request. Run it again and you exit from a different IP, which confirms rotation is working.
Should I build my own rotating proxy instead?
You can, but it is a continuous engineering project: sourcing IPs, health-checking them, writing selection and retry logic, normalizing auth and protocols, and replacing dead IPs forever. A managed gateway absorbs all of that, which is why it reduces setup to one proxy line.
How do I target a country when setting up a rotating proxy?
Select the country or city in your dashboard. Geo-targeting is applied at the gateway, not via URL parameters, so your client code stays the same. Proxy Rotator covers 195+ countries across all proxy types.
Does the rotating proxy support SOCKS5?
Yes. The gateway speaks both HTTPS and SOCKS5 on port 8080. In code, use the socks5h:// scheme so the proxy resolves DNS. The host, port and credentials are the same across both protocols.
How much does a rotating proxy cost to set up?
There is one unified plan from $24.95/mo with metered bandwidth, scaling with concurrency, and it includes every proxy type plus both rotating and sticky modes at the same price. See pricing for current plans.

Set up rotation in one proxy line

Enable rotating mode, point your client at gateway.proxyrotator.com:8080, and get a new IP on every request. One plan, all proxy types, rotating and sticky, from $24.95/mo.

Copied!