The association between viral infections and both cutaneous and mucosal melanoma (MM) has not been fully investigated. Here, we assessed the prevalence of the DNA of a broad range of viruses in 31 MMs and 15 biopsies of healthy mucosa (HM) using molecular methods. The parvoviruses CuV and B19V, herpesviruses HSV1, HSV2, EBV, HHV6, and HHV8, polyomavirus MCPyV, and α‐HPVs were not detected, or rarely found, in MMs, and in HM, of the digestive, respiratory, and female genital tract. The overall prevalence of β‐HPV in MMs was not significantly higher compared to that in HM (70.9% and 53.3% respectively; p = 0.514). However, the number of MMs positive for β‐HPV types belonging to Species 3 and 5 and for some viral types belonging to Species 1, 2, 3, and 5 were significantly higher compared with HM (p < 0.05). Moreover, compared to HM, the MM samples contained a significantly higher number of β‐HPV types, mainly belonging to Species 1, 3, and 5 (p < 0.05). Our data, although suggesting a role for certain β‐HPV types in MM oncogenesis, require additional investigation in larger populations to support this hypothesis.