This article covers subdomains routing implementation using Nuxt.js and @nuxtjs/router.

A big birdhouse with many entrances
A big birdhouse with many entrances

Why subdomains are useful?

Let’s say you want to create a multi-tenants app, something similar to heroku, or google app engine service. You can implement some custom path for each service, so they will look something like this:

Or you can implement it with subdomains approach:

As you can see, the second approach is way more customer friendly, because all service related data is being encapsulated inside this custom subdomain. Not mentioning how easy it will be to assign a custom domain to any of the subdomains.

To…

Yuri Nechaev

Developer / entrepreneur

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store