SN2017egm is the closest (z = 0.03) H-poor superluminous supernova (SLSN-I) detected to date, and a rare example of an SLSN-I in a massive, metal-rich galaxy. We present the HST UV and optical spectra covering 1000-5500 angstrom, taken at + 3 day relative to the peak. Our data reveal two absorption systems at redshifts matching the host galaxy NGC 3191 (z = 0.0307) and its companion galaxy (z = 0.0299) 73 '' apart. Weakly damped Ly alpha absorption lines are detected at these two redshifts, with H I column densities of (3.0 +/- 0.8) x 10(19) and (3.7 +/- 0.9) x 10(19) cm(-2), respectively. This is an order of magnitude smaller than the H I column densities in the disks of nearby galaxies (> 10(10) M-circle dot) and suggests that SN2017egm is on the near side of NGC 3191 and has a low host extinction (E(B - V) similar to 0.007). Using unsaturated metal absorption lines, we find that the host of SN2017egm probably has a solar or higher metallicity and is unlikely to be a dwarf companion to NGC 3191. Comparison of early-time UV spectra of SN2017egm, Gaia16apd, iPTF13ajg, and PTF12dam finds that the continuum at lambda > 2800 angstrom is well fit by a blackbody, whereas the continuum at lambda < 2800 angstrom is considerably below the model. The degree of UV suppression varies from source to source, with the 1400-2800 angstrom continuum flux ratio of 1.5 for Gaia16apd and 0.4 for iPTF13ajg. This cannot be explained by the differences in magnetar power or blackbody temperature. Finally, the UV spectra reveal a common set of seven broad absorption features and their equivalent widths are similar (within a factor of 2) among the four events.