The coordination of cell migration of immune cells is a critical aspect of the immune response to pathogens. Dendritic cells (DCs), the sentinels of the immune system, are exposed to complex tissue microenvironments with a wide range of stiffnesses. Recent studies have revealed the importance of mechanical cues in immune cell trafficking in confined 3D environments. However, the mechanism by which stiffness modulates the intrinsic motility of immature DCs remains poorly understood. Here, immature DCs were found to navigate confined spaces in a rapid and persistent manner, surveying a wide range when covered with compliant gels mimicking soft tissues. However, the speed and persistence time of random motility were both decreased by confinement in gels with higher stiffness, mimicking skin or diseased, fibrotic tissue. The impact of stiffness of surrounding tissue is crucial because most in vitro studies to date have been based on cellular locomotion when confined by microfabricated polydimethylsiloxane structures. Our study provides evidence for a role for environmental mechanical stiffness in the surveillance strategy of immature DCs in tissues.