We demonstrate a widely applicable technique to absolutely calibrate the energy scale of x-ray spectra with experimentally well-known and accurately calculable transitions of highly charged ions, allowing us to measure the K-shell Rydberg spectrum of molecular O2 with 8 meV-uncertainty. We reveal a systematic ∼450 meV shift from previous literature values, and settle an extraordinary discrepancy between astrophysical and laboratory measurements of neutral atomic oxygen, the latter being calibrated against the aforementioned O2 literature values. Because of the widespread use of such, now deprecated, references, our method impacts on many branches of x-ray absorption spectroscopy. Moreover, it potentially reduces absolute uncertainties there to below the meV level.