Give Your Namecheap API Integration a Static IP Your Whitelist Can Trust

QuotaGuard Engineering
June 24, 2026
5 min read
Pattern

Namecheap's API only works from a whitelisted IPv4 address. On dynamic cloud infrastructure that IP changes and breaks access. Route through QuotaGuard for two static IPv4s to whitelist once.

Namecheap's API requires you to whitelist the IPv4 address your requests come from before it will respond. That's a deliberate security control, and it breaks the moment your code runs on cloud infrastructure with a rotating outbound IP. The fix is routing your Namecheap API calls through a proxy with a fixed IPv4. You whitelist two static IPs once and they stay valid across every deploy.

This post is for developers running Namecheap API automations, DNS record management, ACME certificate renewal, domain provisioning, or a Namecheap MCP server, from a server or platform that doesn't give you a stable outbound IP.

Namecheap Requires a Whitelisted IPv4, and It Must Be IPv4

Namecheap's documentation is direct: you must whitelist at least one IP before your API access will begin to work, and only IPv4 addresses can be used. There's no per-token exception and no way around the whitelist. If the IP your request originates from isn't on the list, the API rejects it.

That IPv4-only requirement is worth calling out, because it rules out some workarounds. You can't satisfy Namecheap's whitelist with an IPv6 address. QuotaGuard's static IPs are IPv4, which is exactly what Namecheap's whitelist accepts, so a QuotaGuard IP goes straight onto the list with no compatibility issue.

The problem on cloud platforms is that your outbound IP isn't stable. Heroku, Render, Railway, a serverless function, or any platform that recycles infrastructure hands your code a different egress IP over time. You whitelist today's IP, it works, and then a deploy or a scaling event gives you a new IP that isn't on the list and the API starts failing. This is the recurring pain behind every "my Namecheap cert renewal broke again" thread.

Route Your Namecheap Calls Through QuotaGuard

You whitelist QuotaGuard's two static IPv4 addresses in Namecheap once, then route your API calls through the QuotaGuard proxy. Every request exits from one of those two fixed IPs, so the whitelist stays valid no matter how your platform reassigns IPs.

If you're using the PyNamecheap library, it makes requests through the requests library under the hood, which reads the proxy environment variables automatically. Set them and the calls route through QuotaGuard with no code change:

export HTTP_PROXY="$QUOTAGUARDSTATIC_URL"
export HTTPS_PROXY="$QUOTAGUARDSTATIC_URL"

For a direct call to Namecheap's API with requests, pass the proxy explicitly:

import os
import requests
 
proxies = {
    "https": os.environ["QUOTAGUARDSTATIC_URL"]
}
 
params = {
    "ApiUser": os.environ["NC_API_USER"],
    "ApiKey": os.environ["NC_API_KEY"],
    "UserName": os.environ["NC_USERNAME"],
    "ClientIp": os.environ["NC_CLIENT_IP"],
    "Command": "namecheap.domains.getList",
}
 
response = requests.get(
    "https://api.namecheap.com/xml.response",
    params=params,
    proxies=proxies
)
 
print(response.text)

Namecheap's API also takes a ClientIp parameter in the request itself. Set it to your QuotaGuard static IP so it matches the IP your traffic actually exits from. The response comes back as XML.

QuotaGuard Tip: Whitelist Both Static IPs in Namecheap

QuotaGuard provides two static IPv4 addresses per account behind a load balancer for redundancy. Add both to your Namecheap whitelist, not just one. QuotaGuard routes through either IP for any given request, so if you only whitelist one, roughly half your API calls will fail when traffic exits the unregistered IP. With DNS automation and cert renewal, that shows up as intermittent failures that are hard to trace back to the IP.

Confirm Your Egress IP Before You Whitelist It

Check what IP your requests actually exit from before adding anything to Namecheap's whitelist. Run a check through the proxy:

curl -x "$QUOTAGUARDSTATIC_URL" http://ip.quotaguard.com

That returns your QuotaGuard static IPv4, not your platform's rotating range. Both IPs are shown in your dashboard. Whitelist both in Namecheap, set ClientIp to match, and your API access stays stable.

A Note on Namecheap's API Eligibility

One thing a static IP doesn't change: Namecheap only enables API access for accounts that meet its activity requirements, and turning it on can take a couple of days because Namecheap support has to authorize it. QuotaGuard solves the IP-rotation half of the problem, which is the half that keeps breaking after you're set up. It doesn't unlock API access itself. If your account isn't API-eligible yet, sort that with Namecheap first, then use QuotaGuard to give your automation a stable IP that survives deploys.

Use QuotaGuard Shield if Your Automation Touches Regulated Data

Most Namecheap API use cases, DNS records, domain management, cert renewal, are fine on QuotaGuard Static. If your broader automation also routes regulated data through the same proxy, use QuotaGuard Shield instead. Shield uses SSL passthrough, so the TLS connection runs end-to-end and QuotaGuard never decrypts the traffic. Shield starts at $29 per month on a direct plan. See QuotaGuard Shield for details. For most Namecheap-only setups, Static is the right choice.

Get a Static IPv4 for Your Namecheap Automation

Namecheap's mandatory IPv4 whitelist is a solid security control that breaks every cloud automation running from a rotating IP. QuotaGuard gives your automation two static IPv4 addresses to whitelist once, valid across every deploy and scaling event, in exactly the IPv4 format Namecheap requires.

QuotaGuard Static starts at $19 per month on a direct plan, with two static IPs, bandwidth bundled, and no per-GB fees. Production is $49 per month and Business is $89 per month. Dedicated IPs are available on the Enterprise plan at $219 per month.

See plans and start a trial at quotaguard.com/products/pricing. To talk through a specific Namecheap automation setup, contact us and an engineer will respond directly.

QuotaGuard Static IP Blog

Practical notes on routing cloud and AI traffic through Static IPs.

Reliability Engineered for the Modern Cloud

For over a decade, QuotaGuard has provided reliable, high-performance static IP and proxy solutions for cloud environments like Heroku, Kubernetes, and AWS.

Get the fixed identity and security your application needs today.