Regional Settings

Language

No languages match your search.

Setup · 2026-06-10 · Updated

Using cURL with a proxy for landing-page and geo checks

Send cURL requests through HTTP and SOCKS proxies to check landing pages, redirects and headers by market, test new proxy orders and script polite fetches.

Every web or marketing-ops team eventually needs a quick, repeatable way to ask: what does this page return to a visitor in that market? cURL answers it in one line. It is installed on most computers, it takes a proxy through a single option, and its output can be pasted into a ticket or a report. It is also the quickest way to confirm a new proxy order works before the rest of the team starts using it.

This guide covers the syntax for HTTP and SOCKS proxies, the two ways to send a login, environment variables for whole sessions, and the flags that help when something goes wrong. Every example uses the credential format shown in your dashboard.

Jobs cURL handles well for a business team

  • Acceptance tests: confirm that a new order authenticates and exits where it should, on the day it arrives.
  • Geo-redirect checks: see where a campaign URL sends visitors from a given country.
  • Header and status checks: confirm a landing page answers normally, with the language and caching you expect.
  • Small scheduled fetches: collect a handful of public pages on a timetable, politely.

The one command to learn

The -x option, also written --proxy, tells cURL which proxy to use. With the order's host, port and login from your Cheapest Proxies dashboard to hand, run:

curl -x "http://USER:PASS@HOST:PORT" https://api.ipify.org

The reply should be the proxy's exit IP, not your office address. The http:// prefix on the proxy URL governs only the connection between cURL and the proxy. Requests to https:// sites still work through that HTTP proxy, because cURL opens an encrypted tunnel with the CONNECT method.

Two ways to send the login

Credentials can sit inside the proxy URL, as above, or travel separately with -U or --proxy-user, which keeps them out of the URL:

curl -x "http://HOST:PORT" -U "USER:PASS" https://api.ipify.org

The result is the same. If the order uses IP-whitelist authentication instead, drop the login entirely and point cURL at http://HOST:PORT; it connects as long as your public IP is on the whitelist in the dashboard.

SOCKS5 with remote name lookups

For a SOCKS proxy, change the scheme. We recommend socks5h, which also sends DNS lookups through the proxy:

curl -x "socks5h://USER:PASS@HOST:PORT" https://api.ipify.org

The h at the end of socks5h tells cURL to let the proxy resolve hostnames, so the names of the sites you check do not leak to the local network. Plain socks5 resolves them on your own machine. The option --socks5-hostname HOST:PORT is an equivalent way of writing socks5h.

Checking a landing page as a local visitor would

Two additions make cURL a practical campaign checker: -L follows redirects and -I shows only the response headers. Together they reveal the full redirect chain a visitor in the proxy's market goes through:

curl -sS -I -L -x "http://USER:PASS@HOST:PORT" -H "Accept-Language: de-DE" https://www.example.com/

Each hop prints its status line and a Location header, so you can see whether a geo-redirect sends people to the right regional page. The language header asks for the page as a German-language browser would, which helps when a site picks its language from both location and browser settings.

Whole-session proxy with environment variables

To make every cURL request in a terminal session use the proxy without repeating -x, set the standard environment variables. On Linux or macOS:

export http_proxy="http://USER:PASS@HOST:PORT"
export https_proxy="http://USER:PASS@HOST:PORT"
curl https://api.ipify.org

In Windows PowerShell:

$env:http_proxy = "http://USER:PASS@HOST:PORT"
$env:https_proxy = "http://USER:PASS@HOST:PORT"
curl.exe https://api.ipify.org

cURL picks the variables up without any extra option. To send one request directly while they are set, add --noproxy "*". When you are done, clear them, for example with unset http_proxy https_proxy on Linux or macOS.

Flags worth knowing when something fails

FlagWhat it doesUse it when
-vPrints the full conversation, including the CONNECT exchange with the proxyA login is being refused and you need to see where
-IFetches headers onlyYou need a status code without downloading the page
--connect-timeout 10Limits how long cURL waits to connectAn unreachable proxy should fail quickly in a script
-sHides the progress meterOutput feeds a script; -sS keeps error messages visible

An acceptance test for every new order

Run this as soon as an order lands in the dashboard and record the result:

curl -sS --connect-timeout 10 -x "http://USER:PASS@HOST:PORT" https://api.ipify.org

If it returns an exit IP within the timeout, the order works. If it fails while the details match the dashboard, contact support promptly: proxies that are dead on arrival are replaced or refunded under our refund and replacement policy, which sets a short reporting window.

Looking past the exit IP

A correct exit IP is the first check, not the last. Our What is my IP tool shows your direct address for comparison, the proxy checker tests the endpoint independently, and the DNS leak test reveals whether name lookups stay inside the proxy. That last check matters most with SOCKS, where socks5h keeps lookups in the tunnel.

Scheduled fetches of public pages

cURL works well for collecting a few public pages through a proxy on a schedule. Keep it courteous: read each site's robots.txt, follow its Terms of Service, keep the request rate low, and collect only public information you are permitted to use. Build in pauses rather than firing requests back to back:

for i in 1 2 3; do
  curl -sS -x "http://USER:PASS@HOST:PORT" "https://example.com/page/$i"
  sleep 2
done

Larger jobs call for rotating residential proxy exits, so requests are spread across many addresses; our proxies for scraping page covers that setup. For rank checks from different locations, see proxies for SEO. Do not use proxies to get past a login, to collect data from accounts you do not own, or to break a site's rules.

Which type suits cURL work

For scripts, monitoring and CI jobs, a datacenter proxy is the economical, quick option. When the check needs home-broadband exits or many rotating addresses, choose residential or residential premium. Match the type to the task and compare all four on the pricing page.

Once one command returns the proxy's exit IP, the credentials are confirmed and the rest of the team can build their checks on top of it: -x for the proxy, -U or an embedded login, socks5h for SOCKS with private lookups, and -v whenever you need to see what is happening.

Planning this for your team?

Compare the four proxy types, pick the one that fits the job and pay per GB. Credentials reach your dashboard as soon as payment clears.

Questions about your setup? Talk to our support team, available 24/7.

More reading for your team

Cheapest Proxies logo

or
Continue with Email

By continuing you agree to our Terms and Privacy Policy.

Already have an account?

New here?

Subscriber offer

10% off
your team’s next order

Enter your work email and we’ll send the code there. It applies at checkout to any proxy plan, from datacenter to residential premium.

We send the code, then an occasional offer. To stop those emails, write to support and we’ll remove your address.

Your code is ready

Copy the 10% code below and paste it into the promo code field at checkout. A copy goes to your inbox too, so you can forward it to whoever places the order.

Choose a residential plan →