Should web service application be on different domain?


I want to create web service application using yii2. Other applications written in vanilla php need to use this service.

So if I have code on my vhost, and url to my current website is, where should I "put" yii2 WS app ?

Basically, I am thinking about 3 options but I am not sure which one will be the best ( or maybe none si good? :) )

  1. Yii2 web service app should be subdomain of the main website. For example:

  2. Yii2 web service app should be somewhere inside web site. For example:

  3. Yii2 web service app should be on totally different domain:

Also, no mather what I chose, do you suggest for web service app to be on the same vhost as web site ?

Anyway, what is the best practice, and what are the steps to integrate yii2 web service application into an existing system that is not build using yii2 ?

Thanks in advance