We patterned nanoscale trenches and mesas with different depths and heights in a SiO2 substrate and then deposited a cobalt film on the substrate. We investigated the effect of the trenches and mesas on the magnetic domain structures of the film. The trenches and mesas, fabricated using electron-beam lithography and a reactive ion etch process, have, respectively, a 100 nm width, a 500 nm length, and a depth and height varying from 10 to 50 nm. The cobalt film deposited is 30 nm thick. The topological images and magnetic images were taken at the same time using a commercial magnetic force microscope with an ultrahigh resolution tip made in-house. For the trenches 50 nm deep and mesas 50 nm tall, distinct magnetic poles were observed at each end of the trenches and mesas, indicating formation of the single domain, even though the trenches and mesas were surrounded by a Co film. As the trench depth or the mesa height is reduced by 30 nm, the magnetic poles gradually disappear with reduction of the thickness. This is not surprising because the exchange interaction of the Co film in trenches or the Co film on the mesa with the surrounding Co film becomes stronger as the depth or the height is reduced. However, it is expected that with a Co alloy film such as CoCrTa, single domain can be formed in the trenches and mesas with much smaller depth and height. The formation of single domain in nanoscale trenches and mesas may be utilized as tracking marks for a hard disk. The track marks, unlike conventional discrete tracks,1 do not require direct etching of the ferromagnetic film, are single magnetic domain with magnetization direction in the long axis of the trenches and mesas, and are suitable for miniaturization. These nanoscale trenches and mesas can be fabricated at low cost using nanoimprint lithography.2 They also might be useful for landing zones.