The present invention is a method of dehydroxylating a silica surface that is hydroxylated having the steps of exposing the silica surface separately to a silicon organic compound and a dehydroxylating gas. Exposure to the silicon organic compound can be in liquid, gas or solution phase, and exposure to a dehydroxylating gas is typically at elevated temperatures. In one embodiment, the improvement of the dehydroxylation procedure is the repetition of the soaking and dehydroxylating gas exposure. In another embodiment, the improvement is the use of an inert gas that is substantially free of hydrogen. In yet another embodiment, the present invention is the combination of the two-step dehydroxylation method with a surfactant templating method of making a mesoporous film.