A simple method to design a polymerase chain reaction (PCR) primer for parasites of interest was developed using Dirofilaria immitis as a test sample. The method involved the cloning and sequencing of randomly amplified DNA of the parasite, and designing a primer based on the resulting DNA sequence. Using the primer, DNA fragments of the expected length were amplified by a regular PCR with genomic DNA of Dirofilaria immitis.