Here, we find that the protein kinase DYRK1A is essential for B cell-mediated protection from viral infection and effective vaccination through regulation of class switch recombination (CSR). Here, DYRK1A is linked to viral infectious disease.