This shortcode allows you to add an alias to a site on your server. An alias is a domain / subdomain you can add to point to an existing site on your server.
Shortcode usage format:
- sudo nodalio aliasadd primary.com domain.com
- primary.com – your site’s primary domain/subdomain.
- domain.com – the alias you need to add.
A server alias works differently compared to DNS records. An alias points requests coming from a specific domain to a directory on your server. This is different than a CNAME record which acts as a shortcut to your site. When you need to add a large number of aliases (for example, in a large multisite) it is recommended to use a domain wildcard on your server and DNS instead.
There are 2 commands for adding an alias. If your site has an SSL certificate, please use the aliasadd-https shortcode instead. Using this shortcode on a site with an SSL certificate will result in an error due to HSTS (HTTP Strict Transport Security).
Make sure the alias you’re going to add is correctly pointing to your server. To find out more about DNS records and how to correctly point your domain to a server, click here.