According to the principle of territoriality, both self-employed and employed individuals are always subject to the social security system applicable in the country where they are active.
"Posting Principle"
The territoriality principle is overridden by the so-called "posting principle." In practice, posting constitutes the most significant exception to the principle of territoriality.
The "posting principle" states that in the case of a temporary relocation of an activity abroad, the domestic legal provisions continue to apply. In simplified terms, the domestic legal provisions "radiate" into the foreign jurisdiction.