We developed a scanning-type x-ray Fourier transform holography and applied it to both the soft and hard x-ray regions. For this approach, we prepared the holography mask and the imaging object separately and placed them in contact with each other. In this configuration, the illuminated area can be changed by moving the sample relative to the mask via the translation stage. In this case, an image can be recovered by Fourier inversion of the hologram as in the usual lensless Fourier transform holography. This method also reduces the relative vibration between the mask and sample, and provides good quality images. The method was successfully applied to large-area imaging of magnetic domains in a Co/Pt perpendicular magnetic film with soft x-rays. In addition, cross-sectional imaging of Cu interconnect lines was performed in the hard x-ray region.