The very-high-energy (VHE) gamma-ray spectral indices of blazars show a strong correlation with the source redshift. The absence of any such correlation in low-energy gamma-rays and X-rays indicates the presence of extragalactic background light (EBL)-induced absorption of VHE gamma-rays. By employing a linear regression analysis, this observational feature of blazars is used to constrain the redshifts of BL Lac objects that were unknown/uncertain earlier. In addition, we compare the observed VHE spectral index–redshift correlation with those predicted from commonly adopted EBL models. Our study highlights the deviation of EBL-model-based predictions from observations, especially at high redshifts.