Abstract Exoplanets orbiting close to their host star are expected to support a large ionosphere, which extends to larger pressures than witnessed in our solar system. These ionospheres can be investigated with ground-based transit observations of the optical signatures of alkali metals, which are the source of the ions. However, most ground-based transit spectra do not systematically resolve the wings of the features and continuum, as needed to constrain the alkali abundances. Here we present new observations and analyses of optical transit spectra that cover the Na doublet in the atmosphere of the exoplanet XO-2b. To assess the consistency of our results, observations were obtained from two separate platforms: Gemini/GMOS and Mayall/KOSMOS. To mitigate the systematic errors, we chose XO-2, because it has a binary companion of the same brightness and stellar type, which provides an ideal reference star to model Earth’s atmospheric effects. We find that interpretation of the data is highly sensitive to time-varying translations along the detector, which change according to wavelength and differ between the target and reference star. It was necessary to employ a time-dependent cross-correlation to align our wavelength bins and correct for atmospheric differential refraction. This approach allows us to resolve the wings of the Na line across five wavelength bins at a resolution of ∼1.6 nm and limit the abundance of Na. We obtain consistent results from each telescope with an Na amplitude of 521 ± 161 and 403 ± 186 ppm for GMOS and KOSMOS, respectively. The results are analyzed with a radiative transfer model that includes the effects of ionization. The data are consistent with a clear atmosphere between ∼1 and 100 mbar that establishes a lower limit on Na at ppm ([Na/H] = ), consistent with solar. However, we cannot rule out the presence of clouds at ∼10 mbar that allow for higher Na abundances, which would be consistent with the stellar metallicity measured for the host star ([Na/H] = 0.485 ± 0.043).