The differentiation of T follicular helper cells requires the G-protein-coupled receptor Ebi2 as well as the interaction with CD25-producing dendritic cells that quench T-cell-derived interleukin-2. The T-cell subset known as T follicular helper (Tfh) cells are crucial for mounting antibody responses, but the cues that guide their positioning and development are incompletely understood. Here Jianhua Li et al. demonstrate that the differentiation of Tfh cells requires the G-protein-coupled receptor EBI2 (also called GPR183), as well as the interaction with CD25-producing dendritic cells that quench T-cell-derived interleukin-2. T follicular helper (Tfh) cells are a subset of T cells carrying the CD4 antigen; they are important in supporting plasma cell and germinal centre responses1,2. The initial induction of Tfh cell properties occurs within the first few days after activation by antigen recognition on dendritic cells, although how dendritic cells promote this cell-fate decision is not fully understood1,2. Moreover, although Tfh cells are uniquely defined by expression of the follicle-homing receptor CXCR5 (refs 1, 2), the guidance receptor promoting the earlier localization of activated T cells at the interface of the B-cell follicle and T zone has been unclear3,4,5. Here we show that the G-protein-coupled receptor EBI2 (GPR183) and its ligand 7α,25-dihydroxycholesterol mediate positioning of activated CD4 T cells at the interface of the follicle and T zone. In this location they interact with activated dendritic cells and are exposed to Tfh-cell-promoting inducible co-stimulator (ICOS) ligand. Interleukin-2 (IL-2) is a cytokine that has multiple influences on T-cell fate, including negative regulation of Tfh cell differentiation6,7,8,9,10. We demonstrate that activated dendritic cells in the outer T zone further augment Tfh cell differentiation by producing membrane and soluble forms of CD25, the IL-2 receptor α-chain, and quenching T-cell-derived IL-2. Mice lacking EBI2 in T cells or CD25 in dendritic cells have reduced Tfh cells and mount defective T-cell-dependent plasma cell and germinal centre responses. These findings demonstrate that distinct niches within the lymphoid organ T zone support distinct cell fate decisions, and they establish a function for dendritic-cell-derived CD25 in controlling IL-2 availability and T-cell differentiation.