Transiting planets, such as HD 209458b, offer a unique opportunity to scrutinize the planetary atmospheric content. Although molecular hydrogen is expected to be the main atmospheric constituent, H2 remains uncovered because of the lack of strong transition from near-ultraviolet to near-infrared. Here we analyse the absorption spectrum of HD 209458b obtained by Sing et al. (2008a, ApJ, submitted) which provides a measurement of the absorption depth in the 3000-6200 Å wavelength range. We show that the rise in absorption depth at short wavelengths can be interpreted as Rayleigh scattering within the atmosphere of HD 209458b. Since Rayleigh scattering traces the entire atmosphere, this detection enables a direct determination of the pressure-altitude relationship, which is required to determine the absolute fraction of other elements such as sodium. At the zero altitude defined by the absorption depth of 1.453%, which corresponds to a planetary radius of 0.1205 times the stellar radius, we find a pressure of 33 ± 5 mbar. Using the variation of the Rayleigh scattering cross-section as a function of wavelength, we determine the temperature to be 2200 ± 260 K at 33 mbar pressure.