Received wisdom is that inflammatory bowel disease (IBD) results from a dysregulated immune response to a dysbiotic microflora in genetically susceptible individuals, and there is increasing evidence to support this. From the outset, genetics studies have aimed to help understand the pathogenic mechanisms that underlie IBD, including highlighting which aspects of the environment and exposome may be most relevant. Over the last decade, and predominantly through the technology of genome-wide association studies, they have significantly achieved this. A key advantage of genetic studies over studies of environmental factors is the lack of confounding by inflammation. When undertaking microbial analysis on a population of people who have developed IBD, it is difficult to say with certainty whether any observed effects are a cause or a consequence of inflammation. Genetic studies have highlighted a number of key pathways that when disrupted predispose an individual to IBD. Some of these are phenotype-specific, for example, variants in genes involved in epithelial barrier function are specific to ulcerative colitis; while abnormalities in cellular innate immunity, for example, in autophagy genes ATG16L1 and IRGM, and in the intracellular pattern recognition receptor NOD2, are selectively associated with Crohn's disease (CD). Most, however, are shared between Crohn's disease and ulcerative colitis and have an impact on immune signaling and function; for example, polymorphisms in the human leukocyte antigen complex, cytokines, chemokine receptors, co-stimulatory molecules, and adhesion molecules. A point of interest is how many of these gene variants clearly affect the human immune response to environmental factors, particularly microbial antigens. For example, the majority of loci that have been associated with leprosy are also associated with IBD, either implicating a direct role for mycobacteria or perhaps more likely representing an evolutionary imprint of the immune response to mycobacteria and how this may predispose to IBD in today's environment. Recent data have shown how variants that affect CARD9 function affect production of aryl hydrocarbon receptor ligands by the microbiota, thereby influencing production of IL-22 with its homeostatic properties. There are many other examples, all of which are helping understanding of gene–environment interactions and so piecing together the complex jigsaw puzzle that is IBD pathogenesis.