A serious problem in previous spin-polarized scanning tunneling microscopy experiments has been the clear separation between topographic, electronic, and magnetic information. We have recently solved this problem by measuring the asymmetry of the differential tunneling conductivity at bias voltages corresponding to the energetic positions of the two spin components of exchange-split surface states in an external magnetic field. By mapping the spatial variation of the asymmetry parameter we have been able to observe the nanomagnetic domain structure of Gd(0001) ultrathin films with a spatial resolution below 20 nm.