It explains why only one-in-50 people have flame-coloured locks and could open the door to breakthroughs in forensic science and medicine.
Only about 160 million of the world's eight billion people are redheads, with most being brunettes or blondes.
It has helped the likes of Prince Harry, Ed Sheeran, Chris Evans, Paul Scholes, Fiona Bruce and Kevin De Bruyne - dubbed the 'Ginger Pele' - stand out from the crowd.
Previously, it was thought the root cause was a single gene identified as MC1R inherited from the mother and father.
But now a major study of DNA from almost 350,000 Britons has shown it's much more complicated than that.
The largest genetic study of its kind to date also sheds light on blondes and brunettes.
This could help crimefighters build more accurate photofits of suspects. Hair colour has also been linked to increasing or reducing the risk of various illnesses.
Co-author Professor Albert Tenesa, of Edinburgh University's Roslin Institute, said: "We are very pleased this work has unravelled most of the genetic variation contributing to differences in hair colour among people."
Around one-in-ten Scots, Irish and Welsh boast a carrot top - five times more than the general global population.
The study published in Nature Communications is a significant step towards establishing why.
Previous research had shown redheads inherit two versions of the MC1R gene – one from their mum and dad respectively.
Almost everyone with red hair has two copies - but not everyone carrying them is a redhead.
Scientists knew there must be others involved but these have remained a mystery - until now.
The Scottish team looked at DNA from participants in the UK Biobank - a long running health study that has mapped the genomes of around 500,000 individuals.
They focused only on those of European descent because they have greater variation in hair colour.
By comparing redheads with brown or black haired people the researchers identified eight previously unknown genetic differences.
Looking at the functions of the genes also discovered some work by controlling when MC1R is switched on or off.
In addition to the 'ginger genes' the study uncovered variations in almost 200 genes linked to blondes and brunettes.
It identified a 'colour gradient' of from black, through dark brown to light brown and blonde caused by an increasing number of differences in these 200 genes.
The researchers were surprised to find many of these were linked to hair texture rather than pigmentation.
Others are involved in determining how the hair grows – whether curly or straight, for example.
Co-author Prof Ian Jackson, of the Medical Research Council Human Genetics Unit at the Edinburgh University, said: "We were able to use the power of UK Biobank - a huge and unique genetic study of half a million people in Britain - which allowed us to find these effects."
Extensive mapping of the genes responsible in the participants - who were all white - found the MC1R gene explained less than three quarters (73%) of the heritability for red hair.
Prof Jackson said: "In fact most individuals with two MC1R variants have blonde or light brown hair."
Melanie Welham, executive chair of the Biotechnology and Biological Sciences Research Council (BBSRC), said: "Once again collaborative research is helping to provide answers to some of life's important questions.
"BBSRC is pleased to have helped support the largest genetic study of human hair colour.
"It has provided some fascinating insights into what makes us such distinct individuals."
Studies have shown people with ginger hair are more susceptible to diseases from Parkinson's to skin cancer
But redheads age better because the MC1R gene helps them look two years younger on average than they actually are.
They also produce more Vitamin D protecting against rickets which weakens bones and tuberculosis which can be fatal.
Despite the teasing, redheads enjoy more sex - and all of the health benefits that accompany regular sexual activity.
Ginger men are also half as likely to develop prostate cancer.
The colour of a person's hair is one of the most heritable features - with studies on twins suggesting genetics explains up to 97% of hair colour.