This paper presents an experimental method to realize the best high-order harmonics generation (HHG) phase matching in the interaction of strong optical field with gas target. By studying the effects of the relative location between gas target source and the Gaussian-shaped driving femtosecond laser field focus on the harmonics yield, conclusions are obtained that the optimum position of gas target for phase matching is always behind the of the focal point of the driving field, with much lower HHG yield before the focus caused by serious harmonics phase mismatch. Meanwhile, with optimum harmonics phase matching, the high-order harmonics field that resulted has the similar Gaussian-shaped spatial distribution characteristics with the driving field, verifying experimentally the commonly used assumptions for attosecond laser pulse based on HHG. This optimization method is also suitable both for other driving field with different spatial distribution of light intensity and other type of target source. The results here have important guiding significance for high harmonic generation and high harmonic isolated attosecond pulse technology.