/go/cname is a shortcut for adding a CNAME record through Cloudflare's API. It passes your arguments to cloudflare with the record type set to cname, so you don't have to type the –type option yourself. A CNAME record makes one name an alias of another. For example, blog.example.com can point to example.ghost.io, and visitors are sent wherever the target points. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Add a CNAME record named "blog" for example.com that points to example.ghost.io
/go/cname example.com blog example.ghost.io
Arguments
| Position | Argument | Required | Notes |
|---|---|---|---|
| 1 | <domain> |
Yes | The domain whose DNS zone is on Cloudflare. |
| 2 | <name> |
Only in the three-argument form | The record name, for example blog or www. |
| 2 or 3 | <target> |
Yes | The hostname the record points to. |
Arguments beyond the third are ignored. Nothing is validated by this command; all checks are done by cloudflare.
Examples
# Point blog.example.com to a hosted blog service
/go/cname example.com blog example.ghost.io
# Point www.example.com to the main domain
/go/cname example.com www example.com
# Verify the record after it has been added
dig +short CNAME blog.example.com
Output
The command prints nothing itself. Any output, including success and error messages, comes from cloudflare.
Every run is logged with its arguments and a timestamp, for example [Nov 20 09:15:02]# cname example.com blog example.ghost.io, to /var/log/go/cname.log.
See the full reference at /go/cname and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
