The spleen plays an important role in protective immunity to bloodborne pathogens. Macrophages and dendritic cells (DCs) in the spleen marginal zone capture microbial antigens to trigger adaptive immune responses. Marginal zone macrophages (MZMs) can also act as a replicative niche for intracellular pathogens, providing a platform for mounting the immune response. Here, we describe a role for RANK in the coordinated function of antigen-presenting cells in the spleen marginal zone and triggering anti-viral immunity. Targeted deletion of RANK results in the selective loss of CD169+ MZMs, which provide a niche for viral replication, while RANK signaling in DCs promotes the recruitment and activation of anti-viral memory CD8 T cells. These studies reveal a role for the RANKL/RANK signaling axis in the orchestration of protective immune responses in the spleen marginal zone that has important implications for the host response to viral infection and induction of acquired immunity. Habbeddine et al. show that RANK signaling in the spleen marginal zone plays an important role in orchestrating protective immune responses to viral infection. They show that RANK expressed by macrophages supports viral replication, while RANK signaling in dendritic cells promotes the recruitment and activation of memory CD8 T cells.