Manual:$wgExternalInterwikiFragmentMode

Details
See documentation for above for details of each mode. Because you cannot control external sites, this setting should probably always be, unless every wiki you link to has converted to.