Use of SGLT‐2 inhibitor was associated with a 59% lower risk of nasopharyngeal carcinoma compared to DPP‐4 inhibitor (HR: 0.41, 95% CI: 0.21–0.81, p < 0.01), but there was no significant association with head and neck cancer overall (HR: 1.00, 95% CI: 0.26–3.92, p = 0.997) after adjustments. This evidence concerns the gene DPP4 and head and neck cancer.