The correlation between the vicinal properties of SrTiO3 (001) substrates and the twinning in YBa2Cu3O7–x thin films grown by pulsed-laser deposition is studied using x-ray diffraction with reciprocal space mapping. The vicinal properties, i.e., angle and in-plane orientation, play a significant role in the anisotropic strain starting at the interface between substrate surface and film, and affect the twin behavior of YBa2Cu3O7–x. On substrates having an  in-plane orientation of the step edges, a completely preferred twin pair is observed if the vicinal angle is increased to 0.60°. Whereas on substrates having their step edges oriented along one of the crystallographic axis, the films exhibit a detwinning as the vicinal angle increases. For α = 1.10° a maximum detwinned, i.e., monocrystalline film is obtained. At this angle, the diffusion length of YBa2Cu3O7–x during the growth matches the terrace length of SrTiO3. Up to this specific angle, the films are grown perpendicular to the optical instead of the crystallographic surface.