If you own multiple domains and would like to forward them to a single one, or redirect a subdomain like www to your apex domain, you previously had to create multiple deployments and set up Routes for each of them.
Now, you can accomplish the same, right from your dashboard.

New Setting for Domains

When adding a domain to a project of your choice on the dashboard, you are provided with a new "Edit" button for each of them.
When clicking it, you are presented with a new view that includes a "Redirects to" field:

This setting is available for both new and existing domains.

The Redirect field shows "No Redirect" by default, which means that the domain is not redirected to a different domain.
To create a redirect, all you need to do is add another one of your domains or a subdomain to the project, and the "Redirects to" field will become interactive.

Only domains added to your project can be selected.

That's all!
You just successfully redirected your domain, e.g., www.zeit.rocks to zeit.rocks.

Limitations

To make this feature as simple as possible, the redirection scope is limited to the project that you added your domain to:
Note: You can only redirect to domains that belong to your project.
Furthermore, the number of domains you can add to your project is limited to 50.

API Changes

The production domain section of our API documentation has been adjusted accordingly. To opt-in to this feature, you will need to use the latest version of the project endpoints.

Conclusion

With this new domain redirect feature, it is now possible to redirect domains to each other without having to deal with configuration syntax or additional deployments.
This comes in especially handy in situations where:
  • You would like to redirect your www subdomain to your apex domain.
  • You would like to redirect all the other TLDs of your domain to your main TLD.
Let us know what you think about this change!