Should web service application be on different domain?

Hello,

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 example.com vhost, and url to my current website is www.example.com, 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: service.example.com

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

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

Also, no mather what I chose, do you suggest for web service app to be on the same vhost as www.example.com 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