Namecheap
Registering and renewing through Namecheap: API user and key, the whitelisted IP, every function, DNS host records, sandbox testing and troubleshooting.
The Namecheap registrar module registers, transfers and renews domains through your Namecheap account, using the Namecheap API. It also reads and changes nameservers, contact details, the registrar lock, ID protection (WhoisGuard) and DNS host records, and it keeps the expiry dates up to date. It is free and made for shops that buy their domains from Namecheap. Shared registrar behaviour (the page, Test Connection, the module log) is in Domain registrars; prices and the life of a domain are in Domains.
Switching it on
- Open Setup → Domain Registrars and press Activate on the Namecheap card, then Configure.
- Fill in the four account fields (below) and save.
- Press Test Connection. A good answer reads Connected to Namecheap. Available balance: ....
- Give it to your extensions: press Use for all extensions, or pick it for one extension in Setup → Domain Pricing.
Settings
| Setting | Meaning |
|---|---|
| API user | Your Namecheap API user name, often the same as your account user name. |
| API key | From Profile > Tools > Namecheap API Access. Enable API access there first. Hidden field: leave empty to keep the saved key. |
| Account user name | The Namecheap account the domains belong to. |
| Whitelisted IP | The public IP address of this server, exactly as you added it to the API whitelist at Namecheap. |
| Test mode | Use api.sandbox.namecheap.com, which is a separate sandbox account with its own key. |
All four of the first fields are needed. If one is empty every call fails with Namecheap is not set up yet: the API user, key, user name and whitelisted IP are all needed.
What Namecheap needs from you
- A Namecheap account with API access switched on (Profile > Tools > Namecheap API Access). Namecheap sets its own conditions for enabling the API on an account (for example a minimum balance or number of domains); check them on its API page.
- IP whitelisting. Namecheap refuses API calls from any address that is not on the whitelist. Add the public IP address your server uses to reach the internet, and type the same address in Whitelisted IP. On shared hosting ask your host which address that is; it can differ from the address of your website.
- Money in the account. Registrations and renewals are paid from your Namecheap balance, so keep it topped up.
- For the sandbox, a separate account at Namecheap's sandbox site, with its own API key and its own whitelist.
- HTTPS to the outside (the PHP
curlextension).
What it can do
| Function | Behaviour |
|---|---|
| Availability | Checks the name, and tells you when it is a premium name and what its registration price is. |
| Register | Registers for the number of years ordered, with free WhoisGuard added and switched on when the client chose ID protection. The client's details are used as registrant, technical, admin and billing contact. Nameservers are sent when the client gave some. |
| Transfer | Starts the transfer with the EPP code. The transfer ID is remembered so that Sync can follow it. |
| Renew | Renews for the years asked and reads the new expiry date back. |
| Sync | Reads the status and expiry date. A domain that is gone from the account is marked Transferred Away (or, for a transfer in progress, the transfer status is read). |
| Nameservers | Get Nameservers and Save Nameservers work at Namecheap. An empty list sets Namecheap's default nameservers. |
| Contacts | Read from and saved to Namecheap. |
| Registrar lock | Read and changed at Namecheap. |
| EPP code | Namecheap does not hand out the code through the API. The module answers with the code you stored on the domain page, or a message telling you to ask for it from the Namecheap account. |
| ID protection | Switches WhoisGuard on or off (the domain needs a WhoisGuard subscription). |
| DNS host records | Read and saved. Saving replaces the whole list of host records, so read them first and save the full list. At least one record is needed. The default TTL is 1800 and the default MX priority is 10. |
Typical workflow
- A client orders
example.comfor 2 years and pays the invoice. - With Automatic Registration on, AIOBilling calls Namecheap, the domain becomes Active, the expiry date is set and the client gets Domain Registration Confirmation.
- Each day the cron syncs the expiry date. A renewal invoice is made before the expiry; when it is paid the module renews at Namecheap.
- If a call fails, the administrators get Domain Registration Failed (or Domain Renewal Failed) and the Module Log has Namecheap's own words.
Testing in the sandbox
- Make a sandbox account at Namecheap, enable its API and whitelist your server's IP there.
- Enter the sandbox API user, key and user name, the IP, and switch Test mode on. Test Connection should say Connected to Namecheap (sandbox).
- Order a cheap domain as a test client and pay the invoice. Check the sandbox site for the registration.
- Replace the details with the live ones and switch Test mode off.
Troubleshooting
Open Utilities → Module Log and filter by module namecheap; View shows the request and Namecheap's answer, with the key hidden.
| Message | Cure |
|---|---|
| Namecheap is not set up yet ... | A required setting is empty. |
| Namecheap: ... IP ... or Invalid request IP | The IP is not whitelisted, or Whitelisted IP differs from the address your server really uses. |
| Namecheap: ... authentication ... | Wrong API user, key or account user name, or the key belongs to the other environment (live or sandbox). |
| Namecheap could not be reached: ... | The server cannot call Namecheap: curl, firewall or DNS. |
| Namecheap did not register (domain). | Namecheap refused; the Module Log has its reason, often too little balance or a missing contact detail. |
| Namecheap answered with something that is not XML. | A proxy or firewall is changing the answer. |
More in Troubleshooting.
Was this helpful?
Updated 2026-11-03