Cadmium sulfide (CdS) is an interesting material for applications in optoelectronic and photovoltaic devices. In particular, thin films of n-type CdS are widely used as a window layer in heterojunction solar cells. The optical bandgap energy is the most interesting parameter for these applications. For spray-deposited indium-doped cadmium sulfide (CdS:In) thin films prepared on glass substrates the transmittance measurements were used to estimate the optical bandgap energy. Tailing in the bandgap was observed and found to obey Urbach rule. The effects of film thickness and the substrate temperature on the bandgap energy and the width of the tail were investigated. A linear relation between bandgap energy and width of the tail was found.