The solubility of molecular hydrogen (H2) was measured in haplogranite, andesite, and basalt (MORB) melt. Experiments were carried out with rapid-quench TZM vessels and a piston cylinder apparatus at 0.2 GPa − 4 GPa, 1100 ˚C − 1400 ˚C, and iron-wüstite (Fe-FeO) buffer conditions. H2 contents in quenched glasses were measured by infrared (FTIR) spectroscopy. For this purpose, the infrared extinction coefficient of the 4120 cm− 1 band of H2 in haplogranitic glass was re-calibrated by two independent methods. This yielded a linear molar extinction coefficient of (2.12 ± 0.05) liter mol− 1cm− 1, which is about one order of magnitude larger than a coefficient used in previous studies. The new extinction coefficient was used to quantify H2 solubility in all glass samples of this study. The solubility of molecular hydrogen increases with increasing pressure, being higher in haplogranite than in andesitic or basaltic melt, as expected from ionic porosity considerations. The data at Fe-FeO buffer conditions can all be reproduced by a simple Henry style solubility law cH2 = aHenry P, with aHenry = (206 ± 10) ppm/GPa for basalt, (362 ± 35) ppm/GPa for andesite, and (500 ± 62) ppm/GPa for haplogranite, where ppm is ppm H2 by weight (µg/g). However, due to the use of an erroneous infrared extinction coefficient, previous studies may have overestimated H2 solubility in silicate melts by about one order of magnitude. According to the new data presented here, H2 dissolution in a magma ocean is not a very efficient mechanism for generating elevated hydrogen contents in planetary interiors. Equilibrium thermodynamic modelling shows that in an Earth with chondritic bulk composition, even at an oxygen fugacity six log units below the Fe-FeO buffer, the molar ratio of H2/H2O in the magma ocean is still below unity. At a more plausible oxygen fugacity two log units below Fe-FeO, the ratio is 0.06. However, the strong partitioning of hydrogen into the atmosphere under the very reducing conditions of early accretion may have enhanced hydrogen loss due to hydrodynamic escape and impact erosion. Possibly, this was a decisive mechanism for depleting the Earth in volatiles as compared to its chondritic building blocks.