Tissue rigidity regulates processes in development, cancer and wound healing. However, how cells detect rigidity, and thereby modulate their behaviour, remains unknown. Here, we show that sensing and adaptation to matrix rigidity in breast myoepithelial cells is determined by the bond dynamics of different integrin types. Cell binding to fibronectin through either α5β1 integrins (constitutively expressed) or αvβ6 integrins (selectively expressed in cancer and development) adapts force generation, actin flow and integrin recruitment to rigidities associated with healthy or malignant tissue, respectively. In vitro experiments and theoretical modelling further demonstrate that this behaviour is explained by the different binding and unbinding rates of both integrin types to fibronectin. Moreover, rigidity sensing through differences in integrin bond dynamics applies both when integrins bind separately and when they compete for binding to fibronectin.