The salivary glands represent a major site of cytomegalovirus replication and transmission to other hosts. Despite control of viral infection by strong T cell responses in visceral organs cytomegalovirus replication continues in the salivary glands of mice, suggesting that the virus exploits the mucosal microenvironment. Here, we show that T cell immunity in the salivary glands is limited by the induction of CD4 T cells expressing the regulatory cytokine interleukin (IL)-10. Blockade of IL-10 receptor (IL-10R) with an antagonist antibody dramatically reduced viral load in the salivary glands, but not in the spleen. The mucosa-specific protection afforded by IL-10R blockade was associated with an increased accumulation of CD4 T cells expressing interferon gamma, suggesting that IL-10R signaling limits effector T cell differentiation. Consistent with this, an agonist antibody targeting the tumor necrosis factor receptor superfamily member OX40 (TNFRSF4) enhanced effector T cell differentiation and increased the number of interferon gamma-producing T cells, thus limiting virus replication in the salivary glands. Collectively, the results indicate that modulating effector T cell differentiation can counteract pathogen exploitation of the mucosa, thus limiting persistent virus replication and transmission.