A recent spectrum of the optical afterglow of GRB 970508 suggests that
gamma-ray bursts (GRBs) are cosmological in origin, and it is of cruc
ial importance to derive an accurate distance to each burst. If GRBs o
ccur near their host galaxies (<<40 kpc) then Lyman limit absorption [
N(H I) greater than or equal to 1.6 x 10(17) cm(-2)] should be observa
ble in roughly half the GRB afterglow spectra. Here we outline the met
hodology to obtain a redshift from the GRB afterglow spectrum using th
e recently installed Space Telescope Imaging Spectrograph (STIS) instr
ument on board the Hubble Space Telescope. A low-resolution spectrum w
ith the Multi-Anode Microchannel Array (MAMA) detector gives complete
spectral coverage over the wavelength range 1570-3180 Angstrom (near-u
ltraviolet: NW) and 1150-1740 Angstrom (far-ultraviolet: FUV). Assumin
g that a Target of Opportunity observation is conducted soon (less tha
n or similar to 3 weeks) after a bright burst, a relatively small inte
gration time (similar to 3 orbits) would be sufficient to detect the L
yman limit over a wide redshift range (0.3 less than or similar to z l
ess than or similar to 2.2). Detection (or non-detection) of the Lyman
limit, in concert with ground-based observations of nearby galaxies a
nd Mg II and C IV absorption lines, should provide meaningful constrai
nts on the relationship of GRBs to galaxies.