alias with the /go/alias Command

An alias domain (also called a parked domain) is an extra domain name that shows the same website as a hosted domain. /go/alias creates or deletes one. To create an alias, it: It does not change DNS. Point the alias domain to this server yourself. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Make parked.com show the same site as example.com
/go/alias parked.com example.com

Arguments

Position Argument Required Notes
1 <alias-domain> Yes The extra domain name.
2 <primary-domain> Yes A hosted domain, with a folder in /home.
3 delete No Deletes the alias instead of creating it.

The domains are used as typed. They are not lowercased or checked for a valid format, so pass full, plain domain names.

When deleting, the alias is found by its name alone. The primary domain must still be given in position 2, but it is not used to match the alias.

Examples

# Create an alias
/go/alias parked.com example.com

# Delete an alias
/go/alias parked.com example.com delete

# Review the log of past runs
tail -n 20 /var/log/go/alias.log

Output

Create

Message Meaning
Creating a domain alias <alias>... The checks passed and the alias is being set up.
The domain alias <alias> was created. Done.

Delete

Message Meaning
Alias Domain <alias> has been deleted. The alias was removed from the alias database.

Errors

Each of these stops the command with status 1. Nothing is created.

Message Meaning
Account <alias> already exists in recycle bin The alias is a terminated account waiting to be removed.
Website <alias> already exists. /home/<alias> exists, so the alias is already a hosted site.
Website <primary> not exists. /home/<primary> does not exist.

For the recycle bin error, the command also prints the steps to follow: remove the account forever from Recover Terminated Accounts, then run the command again.

See the full reference at /go/alias 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.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *