The influence of substrate steps and epitaxial strain on magnetic domain walls in thin films was investigated by means of spin-polarized scanning tunneling spectroscopy (Sp-STS). Domain walls in a 2 ML Fe film grown on a W(001) substrate were imaged. The domain wall width is considerably reduced when the wall is located at the step edge. This is explained by the atomic arrangement at the step edges and their influence on the ferromagnetic exchange and magnetic anisotropy. Measurements of the width of domain walls in 4 ML Fe films indicate a reduced exchange constant compared to bulk Fe. This effect is related to the reduced dimensionality but also to the huge strain of 10% in the Fe films.