Is there a way to make instance-agnostic links?

Is there a way to make a link to a community of a foreign instance that opens on the instance of the user that clicks on it?

For example, I would like to make a link to !some_community@foo.com that, when a user of bar.com clicks on it, opens https://bar.com/c/some_community@foo.com instead of https://foo.com/c/some_community.

If it's not possible, don't you think it would be convenient?