Indole is an intercellular and interkingdom signalling molecule found in diverse ecological niches. Caenorhabditis elegans is a bacterivorous nematode that lives in soil and compost environments and a useful model host for studies of host-microbe interactions. Although various bacteria and some plants produce large quantities of extracellular indole, little is known about the effects of indole, its derivatives, or of indole-producing bacteria on the behaviours of C. elegans or other animals. Here, they show that C. elegans senses and moves toward indole and several indole-producing bacteria, but avoids non-indole producing pathogenic bacteria. Furthermore, it was found indole-producing and non-indole-producing bacteria exert divergent effects on the egg-laying behaviour of C. elegans, and that various indole derivatives also modulate chemotaxis, egg-laying behaviour and the survival of C. elegans. In contrast, indole at high concentration can kill C. elegans, which in turn, has the ability to detoxify indole by oxidation and glucosylation. Transcriptional analysis showed indole markedly up-regulated the gene expressions of cytochrome P450s, UDP-glucuronosyltransferases and glutathione S-transferase, which well explained the modification of indole by C. elegans while indole down-regulated the expressions of collagen and F-box genes. Their findings suggest that indole and its derivatives are important signalling molecules during bacteria-nematode interactions.