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). This evidence concerns the gene WEE1 and viral infectious disease.