Since its early days, Now has provided the concept of environments: Every change to your codebase leads to a unique URL which is used for staging. In order to move something to production, you would then assign an alias to it.
Today, we are making these two processes much more straightforward by introducing Automatic Aliases, alongside a new --target option for Now CLI.
As of the latest version of Now CLI, a few changes have been introduced.
The most prominent change is that the base command for assigning an alias to the latest deployment (now alias without any additional arguments) is now officially deprecated.
In place of the base now alias command, three much more straightforward workflows are added:
Going forward, if you run now without any additional arguments, you will be presented with a slightly different output:
~/deck now
> Deploying ~/deck under zeit
> Using project deck
> https://deck-ib06dctig.now.sh [v2] [2s]
deck.mdx        Ready               [38s]
├── index.html (5.08KB)
└── main.js (295.94KB)
> Ready! Aliased to https://deck-andyschneider.zeit.now.sh [3s]
The example above creates a mdx-deck deployment within a team.
Unlike before, the message at the end now contains a second URL; an alias of the deployment. This alias is automatically assigned to all of your deployments and varies depending on your project name, username, and team name.
Users outside a team receive an even shorter address per deployment:
~/deck now
> Deploying ~/deck under andyschneider
...
> Ready! Aliased to https://deck.andyschneider.now.sh [3s]
If you want to allow someone to keep track of your updates to a project, this URL is the perfect fit. No need to share a new URL every time you deploy a change, or remember to alias each change manually.
Thanks to this new default behavior of the Now platform, even our integrations for GitHub and GitLab are now providing you with a cohesive workflow for staging deployments.
Every pull request now comes with a unique URL that renders the latest changes:

No matter how many changes are pushed, the alias stays the same.

Even though the new URLs mentioned above can already be used for staging, there is a special scenario for teams which we have not yet covered:
Within a organization, there is usually the need for a centralized staging domain per project.
This can now be solved by setting the newly introduced --target option in Now CLI to staging when creating a deployment:
~/deck now --target staging
> Deploying ~/deck under zeit
...
> Ready! Aliases assigned [3s]
- https://deck-andyschneider.zeit.now.sh
- https://deck.zeit.now.sh
For users, this option is already the default because there is no room for error (for example; team members accidentally overwriting each other's updates).
In order to make a deployment available under a production domain, you can now set the freshly introduced --target option to production.
This will assign all the aliases defined in now.json to your deployment.
For example, if your configuration file looks like this:
{
  "alias": "andys-deck.com"
}
The deployment output would consider this in the list of aliases at the end:
~/deck now --target production
> Deploying ~/deck under zeit
...
> Ready! Aliases assigned [3s]
- https://deck-andyschneider.zeit.now.sh
- https://andys-deck.com
Because we defined --target production, the andys-deck.com alias was added to the list and the deployment you just created is now immediately available under that address.
From the examples shown above, you might have noticed that all default aliases and staging aliases (just like the unique deployment URL) are ending in now.sh.
If you want to use your own domain instead, you can enable the Custom Deployment Suffix add-on:

For this, you can use any domain you already own or buy a new one in the process.

Once the add-on is enabled, your default aliases will adapt automatically:
~/deck now
> Deploying ~/deck under zeit
...
> Ready! Aliased to https://deck-andyschneider.my-team.dev [3s]
Now that the now alias command (without any arguments) is deprecated, the --target option for Now CLI should be part of every developer's daily workflow.
If your system contains a automated deployment creation workflow, please search your codebase for the following chain of commands:
now
now alias
And replace them with this:
now --target production
Once that is done, the only thing left is to remember using now --target staging whenever you want to provide your team with a centralized staging URL for your project.
Should you have any questions about Automatic Aliasing, please do not hesistate to join our support chat or contact our team directly under support@zeit.co.
We are looking forward to seeing the number of automated aliases rise high.