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 Å, 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α absorption lines are detected at these two redshifts, with H I column densities of (3.0±0.8)×1019 and (3.7±0.9)×1019 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 e ) and suggests that SN2017egm is on the near side of NGC 3191 and has a low host extinction (E(B−V )∼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 λ>2800 Å is well fit by a blackbody, whereas the continuum at λ<2800 Å is considerably below the model. The degree of UV suppression varies from source to source, with the 1400-2800 Å 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.