We report on precision spectroscopy of subwavelength confined molecular gases. This was obtained by rovibrational selective reflection of NH_{3} and SF_{6} gases using a quantum cascade laser at λ≈10.6 μm. Our technique probes molecules at micrometric distances (≈λ/2π) from the window of a macroscopic cell with submegahertz resolution, allowing molecule-surface interaction spectroscopy. We exploit the linearity and high resolution of our technique to gain novel spectroscopic information on the SF_{6} greenhouse gas, useful for enriching molecular databases. The natural extension of our work to thin cells will allow compact frequency references and improved measurements of the Casimir-Polder interaction with molecules.