A dog-associated 16S rDNA genetic marker (ED-1) was designed to detect dog fecal contamination in water through a comparative bioinformatics analysis of Faecalibacterium sequences. For the dog fecal samples, ED-1 had 100% specificity, a high positive rate (89% in dog feces and 92.3% in dog fecal-contaminated water samples), and a low detection limit (107 copies/100mL) in dog-contaminated water samples. Detection of water samples from seven provinces or cities of China showed that ED-1 was stable enough to be applied in practice. Furthermore, the abundance and diversity of dog gut microbiota from two private house pets (PHP) and Third Military Medical University (TMMU) dogs were estimated by using operational taxonomic units, and the significant differences of dog feces were found, as the PHP dogs have a more diverse diet and closer contact with human than dogs in TMMU. However, ED-1 could detect the feces from the two regions, indicating that ED-1 has good reliability.