In biology, a homonym is a name for a taxon that is identical in spelling to another such name, that belongs to a different taxon.
The rule in the International Code of Zoological Nomenclature is that the first such name to be published is the senior homonym and is to be used (it is "valid"); any others are junior homonyms and must be replaced with new names. It is, however, possible that if a senior homonym is archaic, and not in "prevailing usage," it may be declared a nomen oblitum and rendered unavailable, while the junior homonym is preserved as a nomen protectum.
Example: the later homonym Myroxylon L.f. (1782), in the Leguminosae, is conserved against the earlier homonym Myroxylon J.R.Forst. & G.Forst. (1775), in the Flacourtiaceae.
Names that are similar enough that they are likely to be confused, are also considered to be homonymous. For example, Astrostemma Benth. (1880) is an illegitimate homonym of Asterostemma Decne. (1838).
Both Codes only consider taxa that are in their respective scope (animals for the ICZN; primarily plants for the ICBN). Therefore, if an animal taxon has the same name as a plant taxon, both names are valid. For example, the name Erica has been given to both a genus of spiders, Erica Peckham & Peckham, 1892, and to a genus of heaths, Erica L.