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:

example.com/service/1
example.com/service/2
example.com/service/3
1.example.com
2.example.com
3.example.com

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