We employed a sol–gel method to prepare a CdS interlayer (CdS-SG) with a stoichiometric ratio and then fabricated QDSCs.