Skip to content

Commands

All commands support --json for structured JSON output.

Terminal window
namecheap domains check example.com --json

Terminal window
namecheap domains check <domains>

Comma-separated domain names, up to 50.

Terminal window
namecheap domains check example.com,coolstartup.io
✗ example.com taken
✓ coolstartup.io available
Terminal window
namecheap domains list [options]
OptionDescriptionDefault
--type <type>ALL, EXPIRING, EXPIREDALL
--search <term>Filter by keyword
--page <n>Page number1
Terminal window
namecheap domains get <domain>
Terminal window
namecheap domains register <domain> --years <n> --contacts <json> [options]
OptionRequiredDescription
--years <n>yesRegistration period (1-10)
--contacts <json>yesJSON with registrant, tech, admin, auxBilling contacts
--nameservers <ns...>noCustom nameservers
--whoisguardnoEnable WhoisGuard
Terminal window
namecheap domains renew <domain> [--years <n>]
OptionDescriptionDefault
--years <n>Renewal period1
Terminal window
namecheap domains tlds

Terminal window
namecheap dns get <domain>
example.com (3 records)
Name Type Address TTL MX Pref
──────────────────────────────────────────────────────────────────
@ A 93.184.216.34 1800 10
www CNAME example.com 1800 10
@ MX mail.example.com 1800 10

Adds a single record. Existing records are preserved.

Terminal window
namecheap dns add <domain> --type <type> --name <name> --address <value> [options]
OptionRequiredDescription
--type <type>yesA, AAAA, CNAME, MX, TXT, URL, URL301, FRAME, CAA
--name <name>yesHostname: @, www, mail, *, etc.
--address <value>yesIP address, hostname, or text value
--ttl <seconds>noTTL (default: 1800)
--mx-pref <n>noMX preference (default: 10)
Terminal window
namecheap dns add example.com --type A --name @ --address 1.2.3.4
namecheap dns add example.com --type TXT --name @ --address "v=spf1 ~all"

Remove a record by its ID. Get the ID from namecheap dns get.

Terminal window
namecheap dns remove <domain> <hostId>

Replaces all DNS records. Use add/remove for individual changes.

Terminal window
namecheap dns set <domain> --records <json>
Terminal window
namecheap dns default <domain>
Terminal window
namecheap dns ns-get <domain>

Minimum 2 nameservers.

Terminal window
namecheap dns ns-set <domain> <nameservers...>
Terminal window
namecheap dns ns-set example.com ns1.cloudflare.com ns2.cloudflare.com
Terminal window
namecheap dns ns-create <domain> --nameserver <ns> --ip <ip>
Terminal window
namecheap dns ns-info <domain> <nameserver>
Terminal window
namecheap dns ns-update <domain> <nameserver> --old-ip <ip> --new-ip <ip>
Terminal window
namecheap dns ns-delete <domain> <nameserver>

Terminal window
namecheap contacts get <domain>

Returns registrant, tech, admin, and auxBilling contacts.

Terminal window
namecheap contacts set <domain> --contacts <json>

JSON must include all four contact types. Each requires: firstName, lastName, address1, city, stateProvince, postalCode, country (2-letter), phone (+CC.NNNN), emailAddress.


Terminal window
namecheap lock get <domain>
Terminal window
namecheap lock set <domain> lock
namecheap lock set <domain> unlock

Terminal window
namecheap email-forwarding get <domain>

Existing rules are preserved.

Terminal window
namecheap email-forwarding add <domain> --mailbox <alias> --forward-to <email>
Terminal window
namecheap email-forwarding add example.com --mailbox info --forward-to me@gmail.com

Replaces all existing rules.

Terminal window
namecheap email-forwarding set <domain> --rules <json>

JSON format: [{"mailbox":"info","forwardTo":"me@gmail.com"}]


Terminal window
namecheap account balance
Terminal window
namecheap account pricing [options]
OptionDescription
--tld <tld>Filter by TLD (e.g. com)
--action <action>REGISTER, RENEW, TRANSFER, REACTIVATE

Terminal window
namecheap transfers list [--type <ALL|INPROGRESS|CANCELLED|COMPLETED>]
Terminal window
namecheap transfers create <domain> --epp <code> [--years <n>]
OptionRequiredDescription
--epp <code>yesAuthorization code from current registrar
--years <n>noYears (default: 1)
Terminal window
namecheap transfers status <transferId>
Terminal window
namecheap transfers resubmit <transferId>

Terminal window
namecheap whoisguard list [--type <ALL|ALLOTED|FREE|EXPIRED>]
Terminal window
namecheap whoisguard enable <id> --email <email>

<id> — WhoisGuard ID (from whoisguard list). --email — forwarding email address.

Terminal window
namecheap whoisguard disable <id>
Terminal window
namecheap whoisguard renew <id> [--years <n>]
Terminal window
namecheap whoisguard allot <id> --domain <domain> --email <email>

<id> — WhoisGuard ID. --domain — domain to assign it to. --email — forwarding email.

Terminal window
namecheap whoisguard unallot <id>
Terminal window
namecheap whoisguard email <id> --email <email>

Terminal window
namecheap addresses list
Terminal window
namecheap addresses get <id>
Terminal window
namecheap addresses create --data <json>

Required fields: addressName, firstName, lastName, emailAddress, address1, city, stateProvince, stateProvinceChoice (S or P), zip, country (2-letter), phone.

Terminal window
namecheap addresses update <id> --data <json>
Terminal window
namecheap addresses delete <id>
Terminal window
namecheap addresses default <id>