Aliases and Domains
This guide covers how to assign two types of domains to your Now deployments.
- Subdomains under
.now.sh(for example https://hello.now.sh)
- Entirely custom domains (for example https://your-company.com)
Whenever you deploy to Now, the URL you get in return looks something like:
We can split the above URL into few parts:
- https:// -Every single deployment is automatically served under HTTP/2 with SSL. Certificates are automatically provisioned.
- get-started-basic - The application's name. You can customize it upon deployment (for example with the name field in package.json for Node.js deployments or LABEL in Dockerfile for Docker ones.
- etjnigdrkz - A cryptographically-strong random string that makes your URL virtually impossible to guess, while retaining a reasonable length for sharing it with your co-workers or clients.
- .now.sh - All your deployments end in .now.sh by default. Aliases allow you to point them to custom domains.
These URLs are ideal for development and staging, but not ideal for end users.
Now aliases have two purposes:
- Giving your deployment a friendly and memorable name.
- Updating deployments with zero downtime.
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:
- Just the hostname:
- Including http(s):
- Including /:
The same mechanism we explained above can be used to configure a 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:
- external: the domain is associated with a third-party nameserver provider like DNSimple.
- zeit.world: the domain is hosted with zeit.world and
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.