  The extragalactic high-energy $\gamma$-ray sky is dominated by blazars, which
are active galactic nuclei with their jets pointing towards us. Distance
measurements are of fundamental importance yet for some of these sources are
challenging because any spectral signature from the host galaxy may be outshone
by the non-thermal emission from the jet. In this paper, we present a method to
constrain 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 the signatures that the pair-production interaction between
photons with energies larger than approximately 10 GeV and the extragalactic
background light leaves on $\gamma$-ray spectra. We find upper limits for the
distances of 303 $\gamma$-ray blazars, classified as 157 BL Lacertae objects,
145 of uncertain class, and 1 flat-spectrum-radio quasar, whose redshifts are
otherwise unknown. 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 to estimate the
detectability of these blazars with the future Cherenkov Telescope Array,
finding that at least 21 of them could be studied in a reasonable exposure of
20 h.
