We report on magnetic domain structure transition in ultrathin Co films on Au(111) as a function of thickness as observed by magnetic force microscopy (MFM) in ultrahigh vacuum (UHV). The transition from out-of-plane to in-plane anisotropy has been observed at a Co film thickness between 4 monolayers (ML) and 5 ML. Additionally, we have resolved the different contrast within domain walls on the in-plane domain structure which we attribute to different polarization of the domain wall.