Skip to content
stableDNS stableRegistrar betaRegistrarSetup guide checked 2026-09-27

Namecheap BasicDNS

Namecheap API key setup: enable Namecheap API access, allow-list DNSMigrator's static IPv4 address, and copy the account's API username and key.

On this page

Namecheap API key permissions

Credential type
API username and API key
Preview access
API access enabled with an account-wide key; Namecheap offers no read-only API key
Apply access
The same account-wide key, with the calling IPv4 address allow-listed
API endpoint
DNSMigrator uses the provider's fixed API endpoint.

Additional access

The registrar role uses `namecheap.domains.dns.setCustom` with the same key to change nameservers. DNSSEC delegation remains a manual Namecheap step.

DNSControl id

creds.json TYPE
{
  "TYPE": "NAMECHEAP"
}

Create credentials

Enable Namecheap API access, allow-list DNSMigrator's static IPv4 address, and copy the account's API username and key.

Access you'll grant

Preview

API access enabled with an account-wide key; Namecheap offers no read-only API key

Apply

The same account-wide key, with the calling IPv4 address allow-listed

The registrar role uses namecheap.domains.dns.setCustom with the same key to change nameservers. DNSSEC delegation remains a manual Namecheap step.

Before you start

  • For Production, the account must meet at least one Namecheap requirement: 20 domains in the account, a $50 account balance, or $50 spent within the last two years.
  • A domain registered in this Namecheap account and using BasicDNS. Namecheap's API does not manage PremiumDNS or FreeDNS zones.
  • Permission to add DNSMigrator's static IPv4 address to the account's API allow-list.

Setup steps

0 of 6 done

  1. Check the Production requirements

    Confirm the account has at least 20 domains, at least $50 in account balance, or at least $50 spent during the last two years. Namecheap keeps its Sandbox separate and does not apply these Production eligibility checks there.

  2. Enable API access

    Sign in and go to Profile → Tools → Namecheap API Access under Business & Dev Tools, then enable API access.

  3. Allow-list DNSMigrator

    Under the API access settings, add our egress IP to the whitelisted IPs. Namecheap requires at least one allow-listed address and accepts IPv4 addresses only.

    DNSMigrator egress IPour egress IP
  4. Copy the API credentials

    Copy the API key. Your API username is normally the same as your Namecheap account username.

  5. Paste the credentials

    Paste the username into API user and the key into API key. Leave Username empty unless the API command must run for a different Namecheap username.

  6. Keep Sandbox credentials separate

    For testing, create a separate account at sandbox.namecheap.com, enable Namecheap API Access, and allow-list an IPv4 address there. Sandbox and Production accounts, keys, domains, and nameservers do not sync. The current connect form uses Production.

Troubleshooting

`ip-not-allowed`: the request IP is invalid or disabled

Add our egress IP to Profile → Tools → Namecheap API Access. Only IPv4 addresses are accepted.

`api-restricted`: API access is not enabled

Enable API access and confirm the Production account meets one of Namecheap's three eligibility requirements. Wait for any stated review to finish.

The zone cannot be read or changed

The domain must be registered in this account and use Namecheap BasicDNS. PremiumDNS and FreeDNS are not manageable through this API.

Sandbox credentials fail in Production

Sandbox uses a separate account, API key, allow-list, and endpoint. Create Production credentials for this connection.

Official documentation

Guide checked against the official documentation on .

Credential fields

FieldRequirementWhere to find it
API userapiUserRequiredYour Namecheap API username, normally identical to the account username.
API keyapiKeyRequiredThe API key shown after Namecheap enables API access for the account.
UsernameuserNameOptionalOptional command username. Leave empty to use the API user, which is correct for most accounts.

Capabilities

Create zones
No
List zones
Yes
DNSSEC
Managed in the provider console
Minimum TTL
60 seconds
Apex CNAME
No
Read only
No

Record types

  • A
  • AAAA
  • CNAME
  • MX
  • TXT
  • NS
  • CAA
  • ALIAS

Namecheap-only types

  • URL
  • URL301
  • FRAME
  • MXE

These records need translation or review when you move to another provider.

Caveats

  • Namecheap's API replaces the whole host list on every write, so we always read, merge and then write.
  • SRV records can't be managed through the API.
  • URL redirect records are Namecheap-specific and aren't real DNS records.

Troubleshooting

`ip-not-allowed`: the request IP is invalid or disabled
Add {egressIp} to **Profile** → **Tools** → **Namecheap API Access**. Only IPv4 addresses are accepted.
`api-restricted`: API access is not enabled
Enable API access and confirm the Production account meets one of Namecheap's three eligibility requirements. Wait for any stated review to finish.
The zone cannot be read or changed
The domain must be registered in this account and use Namecheap BasicDNS. PremiumDNS and FreeDNS are not manageable through this API.
Sandbox credentials fail in Production
Sandbox uses a separate account, API key, allow-list, and endpoint. Create Production credentials for this connection.