The primary headaches carry a substantial hereditary liability, as shown by twin and family studies. Hereditary factors account for an important proportion of the phenotypic variance in migraine with aura (MA) and without aura (MO) and tension-type headache (TTH), while the disease risk is also considerably increased for first-degree relatives of cluster headache (CH) patients. The patterns of inheritance are complex, which means that both genetic and environmental factors contribute. Familial hemiplegic migraine (FHM), a monogenic subtype of MA, has an autosomal dominant pattern of inheritance, and so far can be ascribed to mutations in three genes, CACNA1A, ATP1A2, and SCN1A, all coding for ion channels. Available studies have not provided clear evidence that these genes are also involved in the more common forms of migraine (MA and MO). Genome-wide linkage studies and genetic association studies based on candidate genes, but no genome-wide association studies, have been performed in migraine, leading to the discovery of several chromosomal loci. Underlying genes, however, have yet to be discovered. This also applies to studies in TTH and CH. Current research tackles methodological flaws in former studies by using large patient cohorts, multivariate statistical methods, and reducing clinical heterogeneity by the introduction of more refined methods of phenotyping, such as latent class analysis and trait component analysis. Also, gene expression profiles by detecting reliable biomarkers of disease will be helpful in the future. Results of large genome-wide association studies for migraine are expected soon. Future fields of headache research pertain to individual response and adverse effects to therapeutic drugs (pharmacogenetics), and the study of epigenetic factors.