The narrow domain wall width w of high-anisotropy materials induces significant pinning of magnetic domains at line defects which - due to spatial resolution limitations - could not be studied directly in the past. By means of spin-polarized scanning tunneling microscopy we have directly correlated the morphology and domain structure of ferromagnetic Dy/W(110) on the nanometer scale. Indeed, the images reveal an effective pinning of the domain walls by two types of line defects. They are identified by growth studies and atomic resolution STM as screw and edge dislocations, two fundamental lattice distortions in solid-state physics.