In this work, we have tried to improve some physical properties of CdO films by Mg doping. Ultrasonic spray pyrolysis technique has been used to obtain the films. Thicknesses and refractive indices of the films have been determined by Spectroscopic ellipsometry technique using Cauchy-Urbach model for fitting. Transmission and reflectance spectra have been taken by UV Spectrophotometer, and band gap values have been determined by optical method. X-ray diffraction patterns have been used to study the structural properties. Texture coefficient, grain size and lattice constants have also been determined. AFM images have been taken to see the effect of Mg doping on surface topography and roughness of CdO films. Finally, it has been concluded that Mg doped CdO films (especially at 4%) have improved properties and are good candidates for photovoltaic applications.