Are government bonds internal or external debt?
Here’s a website from the IMF that has guides on their definition of external debt: link to IMF webpage.
In the 2013 guide, on page 5, the definition is debt owned by foreign entities. So foreign-owned bonds count as external debt.
From a practical perspective, this definition has problems. Tax avoidance schemes typically rely on using international transactions, so determining the true locale of the beneficial owner of securities is difficult. The other major issue is that for developed country government bonds, being a foreigner offers no special treatment - they have exactly the same economic rights with respect to the bond as locales. As such, some people do not consider domestic currency bonds as being “external debt”, but that is using a new definition.