Establishing a blocking layer between the interfaces of the photoanode is an effective approach to improve the performance of dye-sensitized solar cells (DSSCs). In this work, HfO2 blocking layers are deposited via atomic layer deposition (ALD) onto tin-doped indium oxide (ITO) and TiO2. In both cases, addition of the blocking layer increases cell efficiencies to greater than 7%. The improved performance for a HfO2 layer inserted between the ITO/TiO2 interface is associated with an energy barrier that reduces electron recombination. HfO2 blocking layers between the TiO2/dye interface show more complex behavior and are more sensitive to the number of ALD cycles. For thin blocking layers on TiO2, the improved device performance is attributed to the passivation of surface states in TiO2. A distinct transition in dark current and electron lifetime are observed after 4 ALD cycles. These changes to performance indicate thick HfO2 layers on TiO2 formed an energy barrier that significantly hinders cell performance.