Rare earths (Europium, cerium)-doped CdS nanofilms are prepared using the growth technique chemical bath deposition (CBD) at the reservoir temperature of 70±2°C varying the synthesis time in a wide range. For the rare earths doped CdS nanofilms the synthesis time was ranged from 80 to 135 min. The rare earths molar concentration was in the range 0.0≤x≤3.47, which was determined by energy dispersive X-ray spectroscopy (EDS). The X-ray diffraction (XRD) analysis reveals that CdS nanofilms showed the zinc blende (ZB) crystalline phase. The nanocrystal size was ranged from 2.67 to 2.35 nm for the CdS and 1.84-2.33 nm for rare earth-doped CdS that were determined by the Debye-Scherrer equation from ZB (111) direction and it was confirmed by transmission electron microscopy (TEM). The doped CdS exhibits a direct band gap that diminishes with the increase of the synthesis time, from 2.50 to 2.42 eV, which was obtained by transmittance. The room-temperature photoluminescence of CdS presents the band-to-band transition at 431 nm, which is associated with quantum confinement because the grain size is less than its Bohr exciton radius and a dominant band at 523 nm, which is called the optical signature of interstitial oxygen. Eu 3+ -doped CdS photoluminescence shows the dominant radiative peak at 576 nm that is associated to the intra-4f radiative transition of Eu 3+ ions, which corresponds to the magnetic dipole transition, (). For the Ce
3+-doped CdS the dominant radiative transitions are clearly redshifted. Additionally, other radiative peaks associated at structural defects are observed. The passivation of the CdS by rare earths was approximately of two orders of magnitude obtaining better results with cerium.