This guide covers how to assign two types of domains to your Now deployments.
.now.sh(for example https://hello.now.sh)
Whenever you deploy to Now, the URL you get in return looks something like:
We can split the above URL into few parts:
These URLs are ideal for development and staging, but not ideal for end users.
Now aliases have two purposes:
Aliases are managed by invoking the command
now alias, which has the following syntax:
For example, let's say you want
https://get-started-basic-etjnigdrkz.now.sh to be accessible by the alias
All you have to do is run:
After this successful message, your deployment is instantly available via its original URL and the new alias you gave it:
Notice that we omitted
.now.sh at the end of the target subdomain. When one is not given, we default to
As seen in the output, each alias receives a unique identifier. In the example above, it's
It's usually known as the deployment ID, which is also accessible when you list your deployments with
now ls. It can be used in substitution of the URL when running
For convenience, we parse the URLs you supply as parameters to
now alias to extract the hostname, which means the following are all valid source URLs:
The same mechanism we explained above can be used to configure an custom domain.
The command is almost exactly the same:
your-company.com is available to buy, Now will allow you to buy it directly from the command line, which is the only step you need to do. Now will take care of all the domain configuration.
Refer to this guide for more information on domain configuration.
We ensure that your domains are fully protected and only you can alias to them.
When you add an alias to a certain domain name, we first verify its ownership. If it's not been claimed by anyone, we associate it with your account.
After executing the
alias above, just run
now domains ls to see all the domains in your account:
As you can see, there are two types of domains:
now aliasautomatically sets up records.
Once a domain appears under
now domains ls, only you can point aliases to it until you remove it from your account.