The dependence of vortex dynamics on the geometry of magnetic domain pattern is studied in the superconducting/ferromagnetic bilayers, in which niobium is a superconductor, and Co/Pt multilayer with perpendicular magnetic anisotropy serves as a ferrromagnetic layer. Magnetic domain patterns with different density of domains per surface area and different domain size, w, are obtained for Co/Pt with different thickness of Pt. The dense patterns of domains with the size comparable to the magnetic penetration depth (w ≥ λ) produce large vortex pinning and smooth vortex penetration, while less dense patterns with larger domains (w λ) enhance pinning less effectively and result in flux jumps during flux motion.