Do you mean the subdomain?
If the incoming request was for sub.domain.ru, then you want to return a URL that's relative to the scheme & domain, and let the browser fill them in.
If the request was for sub.domain.ru, and you're generating a URL for other.domain.ru, then you've got no choice but to specify the URL explicitly.
It's probably best not to use URL() for the cross-domain case, I think. The parametric (new) router assumes that the URL being generated is in the same domain as the current request. I can see how it might be enhanced to support cross-domain URLs, but it's not trivial, and it doesn't happen now.