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
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 gateway rotates for you, so setup is one proxy line. Here is the whole thing in four steps with real code.
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.
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.
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 -x https://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org # run it again and you exit from a different IP
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
# 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.
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.
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.
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.
Both reach the same goal, a new IP per request. One is a proxy line; the other is an ongoing engineering project.
| Property | Managed gateway | Manage IP lists yourself |
|---|---|---|
| Rotation logic | Handled at the gateway | You write and maintain it |
| Dead-IP handling | Automatic on our side | You probe, retry and replace |
| Client setup | One proxy line | Selection threaded through code |
| Auth & protocols | One scheme, HTTPS or SOCKS5 | Varies per source |
| Geo & type targeting | Set in dashboard | Source-dependent, often none |
| Ongoing maintenance | None on your end | Continuous |
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.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.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.-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.socks5h:// scheme so the proxy resolves DNS. The host, port and credentials are the same across both protocols.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.