Optical absorption and magnetic properties of silica sol-gel monoliths doped with cobalt starting from different precursors and water/1-propanol molar ratios are investigated. Structural characterization of the sol-gel by X-ray absorption near-edge structure (XANES) spectroscopy and extended X-ray absorption fine structure (EXAFS) spectroscopy corroborate, that oxidising state of cobalt is Co(2+). Furthermore, the Co(2+) first neighbors are O atoms displaying a temperature transition from octahedral to tetrahedral coordination. The doped monoliths show thermochromic sensor activity ranging from 10 to 50 degrees C, which is related to the environment of Co(2+) ions. The magnetic susceptibility also varies with Co(2+) ions environment due to changes in the orbital contribution to the magnetic moment. Thus, we achieve a better understanding about environment of the Co(2+) ions in the gel matrix and explain their reversible temperature behaviour in spite of the rigid state of the host matrix. (C) 2009 Elsevier B.V. All rights reserved.