A variety of both Gram-positive and Gram-negative bacteria produce large quantities of indole as an intracellular signal in microbial communities. Biosynthesis of indole is well-studied, and while carbon sources and amino acids are important environmental cues for indole production in Escherichia coli, other environmental factors affecting indole production for this strain are less clear. This study demonstrates that the environmental cue pH is an important factor for indole production that further controls biofilm formation of E. coli. Moreover, E. coli produced a higher level of extracellular indole in the presence of the antibiotics ampicillin and kanamycin, and the increased indole enhanced cell survival during antibiotic stress. Additionally, we found here that temperature is another important factor for indole production; E. coli produces and accumulates a large amount of indole at 50°C, even at low cell densities. Overall, our results suggest that indole is a stable biological compound, and E. coli may utilize indole to protect itself against other microorganisms.