Protein-DNA interactions play a central role in many genetic processes of cells. With the growing crystal structures of protein-DNA complexes, the computational approaches are becoming more and more useful for modeling protein-DNA interactions. This paper proposes template-based alignment with a new scoring function which combined the evolutionary conservation and protein-DNA interacting scores of DNA-contact residues. We showed that the combined scoring function is better to model the protein-DNA interactions than applying only one. Our method achieved high accuracy in identifying DNA-binding domains of 69 representative families and with the correlation 0.6 in predicting the binding free energy of the alanine scanning data. By applying the method to the hormone receptor family, it showed that our method can identify the DNA-binding specificity in different subfamilies. The evolutionary conservation is able to reflect the evolution pressure of DNA-contact residues and the interaction preferences can indicate the binding affinity between the protein and DNA. Experimental results show that both the evolution conservation and the DNA-binding capability of the DNA-contact residues are essential for identifying DNA-binding domains and protein-DNA interactions.