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 (refs1,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.