Quick start with Alibaba Cloud CLI domain commands
With Alibaba Cloud CLI domain commands, you can query domain names and manage DNS records in the terminal, or hand the work to an AI assistant. This topic describes installation, common commands, and usage examples.
Install the CLI
Run the following command. The script automatically installs or upgrades Alibaba Cloud CLI and installs the domain plug-in.
macOS/Linux
curl -fsSL https://aliyuncli.alicdn.com/cli-ext/domain-cli/install.sh | bash
Windows PowerShell
irm https://aliyuncli.alicdn.com/cli-ext/domain-cli/install.ps1 | iex
Windows CMD
powershell -c "irm https://aliyuncli.alicdn.com/cli-ext/domain-cli/install.ps1 | iex"
After installation, run:
aliyun domain --help
If the list of domain commands is displayed, the installation is successful. If command not found is returned, restart the terminal and try again.
For first-time use, run:
aliyun domain login
Complete the authorization in the browser. No AccessKey is required.
Common CLI commands
In the examples, replace example.com with your actual domain name.
|
What you want to do |
Command |
|
View the domain names under your account |
|
|
Filter by status or expiration date |
|
|
Check whether a domain name can be registered and view the reference price |
|
|
View or add DNS records |
|
|
Check transfer-in eligibility |
|
|
Enable the transfer prohibition lock |
|
|
Check identity verification status |
|
|
Submit identity verification materials |
|
|
Transfer ownership or change the registrant |
|
|
Check logon status or log out |
|
For more commands, see the aliyun domain command reference.
Usage examples
You can send the following examples directly to an AI assistant, or run the corresponding commands in the terminal. Replace example.com with your actual domain name.
Check renewal and redemption status
aliyun domain search --status renewal-required
aliyun domain search --status redemption-required
aliyun domain price --domain example.com
You can also tell the AI assistant: "Find the domain names under my account that need renewal or redemption and give me the reference prices."
Domain name identity verification
aliyun domain verification domain-status --domain example.com
You can also tell the AI assistant: "Check the identity verification status of example.com."
To submit identity verification materials for an information template, use aliyun domain template verify --template-id <template ID> --input-file ./verify.json. By default, the command only previews the submission, and the materials are submitted only after you confirm. A successful submission does not mean that the review has passed.
Transfer domain name ownership
aliyun domain set-contact --domains example.com --template-id <template ID> --type registrant
Review the preview first, and then add --confirm=true to submit after checking. You can also tell the AI assistant: "Use a verified template to change the registrant information of example.com to <template ID>. Show me the preview first."
This operation requires an information template that has passed verification. After submission, a 60-day transfer-out restriction is triggered. For complete transfer-of-ownership rules and suffix restrictions, see the console.
Precautions and FAQ
Precautions
-
Check the preview before making changes. Confirm that the target domain name and the changes are correct before submitting.
FAQ
-
Error:
aliyun: command not found. What should I do?Add the installation directory to
PATH, reopen the terminal, and try again. -
The
domaincommand is not available. What should I do?Run
aliyun plugin install --names aliyun-cli-domainto install the domain plug-in. -
The authorization page did not open automatically in the browser. What should I do?
Copy the authorization link from the command output, open it in a browser, and complete the authorization.
-
The settings did not change after I ran a modification command. What should I do?
Modification commands only preview the change by default. Check the preview, add the confirmation parameter, and run the command again.
-
trade detailreturnsINTERNAL. What does it mean?If the error body contains
DomainNotOnSale, the domain name is not currently on sale. This is not a system failure or a parameter error, and you do not need to retry.
For more information, see the aliyun domain usage guide.