Domain walls were studied for permalloy wires with different depth trenches (500 nm wide, 30 nm thick, 7.5 µm long, the depth of the trench was 0, 4, 5, 8, 10, 12 and 15nm). Permalloy (Ni80Fe20) wires were fabricated by electron beam lithography and Ar ion milling. When the depth of trench is smaller than 12 nm, the switching field (Hs) is increasing with the deeper trench. However, the depth of trench is bigger than half depth of thickness, the Hs is decreasing with the deeper trench. We believed that Hs increased as the trench depth increased was because the magnetic diploes force increased between the magnetic poles on two sides of the trench. The domains of the wires were divided by the trenches and the domain walls were pinned on the trenches these were confirmed by magnetic force microscopy images.