Univariable and multivariable analyses identified age, smoking, sexual behavior, and sexually transmitted diseases (STD) history as factors associated with HPV infection; however, notable differences were observed by sexual orientation and anatomical site (
Tables S6–9). At the external genitalia, older age (36–45 years
vs. 18–25 years) was associated with elevated HPV risk in HM (aOR = 1.26–1.60), whereas in MSM, elevated risk was concentrated among those aged 26–35 years (aOR = 1.56–1.68). In the perineal–perianal area, MSM aged 26–40 years had significantly elevated risk (aOR = 1.58–2.06), whereas HM showed no significant age-related differences. At the anal canal, HM aged 36–40 years had relatively low HPV prevalence (aOR = 0.74), whereas MSM aged 31–40 years had elevated risk (aOR = 1.85–1.96) (
Figure 1E). Regarding behavioral factors, older age at sexual debut was protective across most anatomical sites in both populations (aOR range: 0.33–0.85). In addition, among HM, external genital HPV infection was significantly associated with smoking, having multiple sexual partners, the partner’s HPV infection history, and STD history (aOR range: 1.46–3.42). In contrast, among MSM, only occasional smoking reached statistical significance (aOR = 2.03). At the perineal–perianal area, HM HPV infection was associated with regular smoking and having multiple sexual partners (aOR range: 1.30–1.99), whereas circumcision was found to be protective (aOR = 0.79). At the anal canal, circumcision remained protective in HM (aOR = 0.80), whereas in MSM, having multiple sexual partners and an STD history was associated with elevated risk (aOR range: 1.97–2.43).