For global template matching (GTM), which is commonly used in the positioning of rail fasteners, only the fastener template is used to search the global image in both two dimensions, which will result in errors in two dimensions, and the lower positioning accuracy will be caused. A positioning method for rail fasteners based on double template matching (DTM) is proposed in this paper, in which the double template contains the rail template and the fastener template. First, the rail template is used to scan the original image in horizontal dimension, and the squared Euclidean distance (SED) is used to obtain the rail positioning in the original image. Combining with the prior knowledge of the fastener template image, the image composed of the rail and the fastener can be obtained, which is called the Rail Area Map (RAM) in this paper. Then, after preprocessing the RAM and the fastener template image, the fastener template image is used to scan the RAM in vertical dimension, and the normalized correlation coefficient (NCC) is used to calculate the similarity between the template and the subgraph of the RAM to achieve precise positioning of the fastener. The proposed DTM method adopts a positioning strategy from coarse to fine, and two templates are used to complete different positioning tasks in their own dimension, respectively. Due to the rail can be precise positioned in horizontal dimension, the error of the fastener positioning in the horizontal dimension can be avoided, and thus, the positioning accuracy can be improved. Experiments on the on-site line fastener images prove that the proposed method can effectively achieve the precise positioning of fasteners.