Twin studies have demonstrated the importance of environmental factors in the pathogenesis of inflammatory bowel disease, but progress has been relatively slow in identifying these, with the exception of smoking, which is positively associated with Crohn's disease and negatively associated with ulcerative colitis. Genetic studies have identified risk alleles which are involved in host-bacterial interactions and the mucosal barrier, and evidence is building for a likely pathogenic role for changes in the gut microbiome, with respect to both faecal and mucosa-associated microbiota. Some of these changes may be secondary to inflammation, nevertheless promising new therapeutic targets are beginning to emerge.