Structural, optical and magnetic properties of CdS thin films with the addition of Co prepared by (i) spray pyrolysis of Cd1-xCoxS (x <= 0.10) thin films (Type 1) and (ii) Co diffusion doped CdS films (Type 2) were investigated. The undoped film has a hexagonal structure with a strong (112) prefer-red orientation. As the Co concentration in CdS is increased, the preferred orientation changes from (112) to (0 0 2) direction. X-ray photoelectron spectroscopy (XPS) analysis shows that Co atoms on the surface of films are found to be bounded either to S atoms or 0 atoms. Although most of the bindings of Co atoms include Co-O bondings, some of them replace the Cd atoms by making chemical bounds with S atoms. The transmittance spectra indicate the four characteristic absorption maxima at the wavelengths of 680, 685, 729 and 744 nm, which were not observed for the undoped CdS film. Band gap energy E-g decreases from 2.43 to 2.37 eV with increasing Co content from x = 0 to 0.10. The Co-doped Cd1-xCoxS films grown by spray pyrolysis (Type 1) didnot show any sign of ferromagnetic behavior. However, the Co diffused CdS films (Type 2) have clear ferromagnetic loops. (C) 2008 Elsevier B.V. All rights reserved.