When a pulse of light reflects from a mirror that is travelling close to the speed of light, Einstein's theory of relativity predicts that it will be up-shifted to a substantially higher frequency and compressed to a much shorter duration. This scenario is realized by the relativistically oscillating plasma surface generated by an ultraintense laser focused onto a solid target. Until now, it has been unclear whether the conditions necessary to exploit such phenomena can survive such an extreme interaction with increasing laser intensity. Here, we provide the first quantitative evidence to suggest that they can. We show that the occurrence of surface smoothing on the scale of the wavelength of the generated harmonics, and plasma denting of the irradiated surface, enables the production of high-quality X-ray beams focused down to the diffraction limit. These results improve the outlook for generating extreme X-ray fields, which could in principle extend to the Schwinger limit.