We find that Ni L2 edge x-ray magnetic linear dichroism is fully reversed for NiO(001) films on materials with reversed lattice mismatch. We relate this phenomenon to a preferential stabilization of magnetic S domains with main spin component either in or out of the plane, via dipolar interactions. This suggests a way to selectively control spin structures in 3d systems with small spin-orbit coupling.