Escherichia coli comprise a diverse array of both commensals and niche-specific pathotypes. The ability to cause disease results from both carriage of specific virulence factors and regulatory control of these via environmental stimuli. Moreover, host metabolites further refine the response of bacteria to their environment and can dramatically affect the outcome of the host-pathogen interaction. Here, we demonstrate that the host metabolite, D-serine, selectively affects gene expression in E. coli O157:H7. Transcriptomic profiling showed exposure to D-serine results in activation of the SOS response and suppresses expression of the Type 3 Secretion System (T3SS) used to attach to host cells. We also show that concurrent carriage of both the D-serine tolerance locus (dsdCXA) and the locus of enterocyte effacement pathogenicity island encoding a T3SS is extremely rare, a genotype that we attribute to an 'evolutionary incompatibility' between the two loci. This study demonstrates the importance of co-operation between both core and pathogenic genetic elements in defining niche specificity.