The high-energy gamma-ray sky is dominated by blazars, active galactic nuclei with their jets
pointing towards us. Measuring distances to these sources is challenging because any spectral
signature from the galaxy may be outshone by the non-thermal emission from the jet. In this
contribution, we present a novel method to estimate redshifts for these sources that relies only
on data from the Large Area Telescope on board the Fermi Gamma-ray Space Telescope. This
method takes advantage of signatures that arise in gamma-ray spectra and result from pairproduction
interactions between photons with energies larger than approximately 10 GeV and the
extragalactic background light. We find upper limits to the distances to 303 gamma-ray blazars
that previously did not have redshifts, including 157 BL Lacertae objects, 145 of uncertain class,
and 1 flat-spectrum-radio quasar. These derivations can be useful for planning observations with
Imaging Atmospheric Cherenkov Telescopes and also for testing theories of supermassive black
hole evolution. Our results are applied for estimating the detectability of these blazars with the
MAGIC telescopes, finding that 4 of them could be studied in a reasonable exposure of 20 hours.