Commands
All commands support --json for structured JSON output.
namecheap domains check example.com --jsondomains
Section titled “domains”Check availability
Section titled “Check availability”namecheap domains check <domains>Comma-separated domain names, up to 50.
namecheap domains check example.com,coolstartup.io✗ example.com taken✓ coolstartup.io availableList domains
Section titled “List domains”namecheap domains list [options]| Option | Description | Default |
|---|---|---|
--type <type> | ALL, EXPIRING, EXPIRED | ALL |
--search <term> | Filter by keyword | |
--page <n> | Page number | 1 |
Get domain info
Section titled “Get domain info”namecheap domains get <domain>Register a domain
Section titled “Register a domain”namecheap domains register <domain> --years <n> --contacts <json> [options]| Option | Required | Description |
|---|---|---|
--years <n> | yes | Registration period (1-10) |
--contacts <json> | yes | JSON with registrant, tech, admin, auxBilling contacts |
--nameservers <ns...> | no | Custom nameservers |
--whoisguard | no | Enable WhoisGuard |
Renew a domain
Section titled “Renew a domain”namecheap domains renew <domain> [--years <n>]| Option | Description | Default |
|---|---|---|
--years <n> | Renewal period | 1 |
List available TLDs
Section titled “List available TLDs”namecheap domains tldsGet DNS records
Section titled “Get DNS records”namecheap dns get <domain>example.com (3 records)Name Type Address TTL MX Pref──────────────────────────────────────────────────────────────────@ A 93.184.216.34 1800 10www CNAME example.com 1800 10@ MX mail.example.com 1800 10Add a record
Section titled “Add a record”Adds a single record. Existing records are preserved.
namecheap dns add <domain> --type <type> --name <name> --address <value> [options]| Option | Required | Description |
|---|---|---|
--type <type> | yes | A, AAAA, CNAME, MX, TXT, URL, URL301, FRAME, CAA |
--name <name> | yes | Hostname: @, www, mail, *, etc. |
--address <value> | yes | IP address, hostname, or text value |
--ttl <seconds> | no | TTL (default: 1800) |
--mx-pref <n> | no | MX preference (default: 10) |
namecheap dns add example.com --type A --name @ --address 1.2.3.4namecheap dns add example.com --type TXT --name @ --address "v=spf1 ~all"Remove a record
Section titled “Remove a record”Remove a record by its ID. Get the ID from namecheap dns get.
namecheap dns remove <domain> <hostId>Set all records
Section titled “Set all records”Replaces all DNS records. Use add/remove for individual changes.
namecheap dns set <domain> --records <json>Reset to default
Section titled “Reset to default”namecheap dns default <domain>Get nameservers
Section titled “Get nameservers”namecheap dns ns-get <domain>Set custom nameservers
Section titled “Set custom nameservers”Minimum 2 nameservers.
namecheap dns ns-set <domain> <nameservers...>namecheap dns ns-set example.com ns1.cloudflare.com ns2.cloudflare.comRegister a glue nameserver
Section titled “Register a glue nameserver”namecheap dns ns-create <domain> --nameserver <ns> --ip <ip>Get nameserver info
Section titled “Get nameserver info”namecheap dns ns-info <domain> <nameserver>Update nameserver IP
Section titled “Update nameserver IP”namecheap dns ns-update <domain> <nameserver> --old-ip <ip> --new-ip <ip>Delete a glue nameserver
Section titled “Delete a glue nameserver”namecheap dns ns-delete <domain> <nameserver>contacts
Section titled “contacts”Get contacts
Section titled “Get contacts”namecheap contacts get <domain>Returns registrant, tech, admin, and auxBilling contacts.
Set contacts
Section titled “Set contacts”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.
Get lock status
Section titled “Get lock status”namecheap lock get <domain>Lock or unlock
Section titled “Lock or unlock”namecheap lock set <domain> locknamecheap lock set <domain> unlockemail-forwarding
Section titled “email-forwarding”Get rules
Section titled “Get rules”namecheap email-forwarding get <domain>Add a rule
Section titled “Add a rule”Existing rules are preserved.
namecheap email-forwarding add <domain> --mailbox <alias> --forward-to <email>namecheap email-forwarding add example.com --mailbox info --forward-to me@gmail.comSet all rules
Section titled “Set all rules”Replaces all existing rules.
namecheap email-forwarding set <domain> --rules <json>JSON format: [{"mailbox":"info","forwardTo":"me@gmail.com"}]
account
Section titled “account”Balance
Section titled “Balance”namecheap account balancePricing
Section titled “Pricing”namecheap account pricing [options]| Option | Description |
|---|---|
--tld <tld> | Filter by TLD (e.g. com) |
--action <action> | REGISTER, RENEW, TRANSFER, REACTIVATE |
transfers
Section titled “transfers”List transfers
Section titled “List transfers”namecheap transfers list [--type <ALL|INPROGRESS|CANCELLED|COMPLETED>]Create transfer
Section titled “Create transfer”namecheap transfers create <domain> --epp <code> [--years <n>]| Option | Required | Description |
|---|---|---|
--epp <code> | yes | Authorization code from current registrar |
--years <n> | no | Years (default: 1) |
Get transfer status
Section titled “Get transfer status”namecheap transfers status <transferId>Resubmit transfer
Section titled “Resubmit transfer”namecheap transfers resubmit <transferId>whoisguard
Section titled “whoisguard”List entries
Section titled “List entries”namecheap whoisguard list [--type <ALL|ALLOTED|FREE|EXPIRED>]Enable
Section titled “Enable”namecheap whoisguard enable <id> --email <email><id> — WhoisGuard ID (from whoisguard list). --email — forwarding email address.
Disable
Section titled “Disable”namecheap whoisguard disable <id>namecheap whoisguard renew <id> [--years <n>]Allot to a domain
Section titled “Allot to a domain”namecheap whoisguard allot <id> --domain <domain> --email <email><id> — WhoisGuard ID. --domain — domain to assign it to. --email — forwarding email.
Unallot
Section titled “Unallot”namecheap whoisguard unallot <id>Change forwarding email
Section titled “Change forwarding email”namecheap whoisguard email <id> --email <email>addresses
Section titled “addresses”List address profiles
Section titled “List address profiles”namecheap addresses listGet address details
Section titled “Get address details”namecheap addresses get <id>Create address
Section titled “Create address”namecheap addresses create --data <json>Required fields: addressName, firstName, lastName, emailAddress, address1, city, stateProvince, stateProvinceChoice (S or P), zip, country (2-letter), phone.
Update address
Section titled “Update address”namecheap addresses update <id> --data <json>Delete address
Section titled “Delete address”namecheap addresses delete <id>Set as default
Section titled “Set as default”namecheap addresses default <id>