If you look for "internet" in the Real Academia Española dictionary you will see:
. Red informática mundial, descentralizada, formada por la conexión directa entre computadoras mediante un protocolo especial de comunicación.
According to the Real Academia Española the above mentioned words are ambiguous, that is, they have an ambiguous gender. They can be masculine and feminine but their meaning will be exactly the same in both genders.
In Spain the word "internet" is usually used with no article: "Internet es muy amplio" or with the masculine article "el": "el internet".
There's no rule that let us recognize an ambiguous term but, in general, it is chosen depending on the register, context or dialect and personal preferences. For instance, in maritime context, "mar" is used following the feminine article (la mar). In our opinion, the best way to know if a term is ambiguous is by checking it out in the dictionary. Moreover, it is important to say that ambiguous names have not been always the same so they change over the years. "Calor" was registered in the 21 edition of Real Academia Española dictionary (1992) as an ambiguous name but now "la calor" (femenine) is considered vulgar and archaic so it is only possible the masculine gender.
Do you know any other ambiguous term?