v1.8.91-d84675c
← Back to Hex Proxies

Residential Proxy Best Practices

Last updated: April 2026

By Hex Proxies Engineering Team

A complete guide to residential proxy best practices covering rotation strategies, country targeting, bandwidth management, anti-detection techniques, and cost optimization.

intermediate18 minutestechnical

Prerequisites

  • Hex Proxies residential plan
  • Basic proxy knowledge

Steps

1

Configure country targeting

Set country parameters in your proxy URL to match your data collection requirements.

2

Optimize bandwidth

Add compression headers, block unnecessary resources, and cache repeated requests.

3

Implement request pacing

Add random delays between requests to maintain residential IP reputation.

4

Set session strategy

Choose rotating or sticky sessions based on your specific task requirements.

5

Monitor and optimize

Track bandwidth usage, success rates, and costs to continuously improve efficiency.

Residential Proxy Best Practices

Residential proxies provide IP addresses from real ISPs across 195+ countries. They carry the highest trust level of any proxy type — but using them effectively requires understanding rotation, targeting, bandwidth management, and anti-detection patterns. Follow these best practices to achieve 95%+ success rates.

Understanding Residential IP Pools

Hex Proxies' residential network provides rotating IP addresses from genuine residential ISPs worldwide. Each request can route through a different IP, or you can use sticky sessions to maintain the same IP. The pool is massive — providing IP diversity that makes fingerprinting practically impossible.

Best Practice 1: Country Targeting

Always target the country closest to your use case:

def get_residential_proxy(username: str, password: str, country: str = "") -> str: user = f"{username}-country-{country.lower()}" if country else username return f"http://{user}:{password}@gate.hexproxies.com:8080"

# Target US for US-specific content us_proxy = get_residential_proxy("YOUR_USER", "YOUR_PASS", "US")

# Target UK for UK pricing uk_proxy = get_residential_proxy("YOUR_USER", "YOUR_PASS", "GB") ```

**Why this matters**: Many sites serve different content by country. Using a US proxy to scrape UK pricing returns US prices — which is wrong data.

Best Practice 2: Optimize Bandwidth

Residential plans are typically billed per GB. Minimize waste:

  1. **Always send compression headers**: `Accept-Encoding: gzip, deflate, br`
  2. **Block unnecessary resources** in browser automation (images, videos, fonts)
  3. **Use HEAD requests** when you only need status codes
  4. **Cache responses** for pages you visit repeatedly
  5. Extract only the data you need — do not store full HTML for simple data points

Best Practice 3: Request Pacing

Residential IPs have high trust, but they are not invincible:

import random

async def paced_fetch(url: str, proxy: str) -> str: # Random delay mimics human browsing patterns await asyncio.sleep(random.uniform(1.5, 4.0)) async with httpx.AsyncClient(proxy=proxy, timeout=30) as client: resp = await client.get(url, headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html,application/xhtml+xml", "Accept-Encoding": "gzip, deflate, br", }) return resp.text ```

Best Practice 4: Session Strategy

| Task | Session Type | Duration | |------|-------------|----------| | Product scraping | Rotating | Per request | | Account creation | Sticky | 30 minutes | | Search scraping | Sticky | Per search session (5-10 queries) | | Price monitoring | Rotating | Per request | | Social media ops | Sticky | Persistent (hours) |

Best Practice 5: Error Handling

Residential networks have slightly higher variance than ISP proxies. Build robust error handling:

async def resilient_fetch(url: str, username: str, password: str, max_retries: int = 3) -> dict:
    for attempt in range(max_retries):
        proxy = get_residential_proxy(username, password)
        try:
            async with httpx.AsyncClient(proxy=proxy, timeout=20) as client:
                resp = await client.get(url)
                if resp.status_code == 200:
                    return {"success": True, "body": resp.text, "attempts": attempt + 1}
                if resp.status_code in (403, 429):
                    await asyncio.sleep(2 ** attempt)
                    continue
        except (httpx.TimeoutException, httpx.ConnectError):
            await asyncio.sleep(1)
            continue
    return {"success": False, "body": "", "attempts": max_retries}

Best Practice 6: Monitor Usage

Track your residential bandwidth consumption: - Set up daily usage alerts in the Hex Proxies dashboard - Log per-request bandwidth to identify wasteful patterns - Compare bandwidth vs success rate — high bandwidth with low success indicates blocked requests re-downloading error pages

Cost Optimization Summary

| Optimization | Bandwidth Saving | Implementation Effort | |---|---|---| | Compression headers | 30-50% | 1 line of code | | Block images/fonts | 60-80% | Low | | Conditional requests | 90%+ for repeats | Medium | | HEAD requests | 95%+ | 1 line of code |

Hex Proxies residential network processes 800TB of data daily across 50 billion weekly requests. Our infrastructure supports SOCKS5, HTTP, and HTTPS with country-level targeting across 195+ countries.

Tips

  • *Always use country targeting — untargeted requests may route through countries that give you wrong data.
  • *Send Accept-Encoding: gzip, deflate, br on every request — free 30-50% bandwidth saving.
  • *Use rotating sessions for scraping and sticky sessions for account management.
  • *Monitor your per-GB usage in the dashboard and set daily alerts to avoid surprise bills.
  • *Pace requests at 1-3 seconds between each to maintain high success rates.

Ready to Get Started?

Put this guide into practice with Hex Proxies.

Cookie Preferences

We use cookies to ensure the best experience. You can customize your preferences below. Learn more