By analyzing $2.93 rm fb^{-1}$ of data taken at the $psi(3770)$ resonance peak with the BESIII detector, we measure the branching fractions for the hadronic decays $D^+to K^0_SK^0_S K^+$, $D^+to K^0_SK^0_S pi^+$, $D^0to K^0_S K^0_S$ and $D^0to K^0_SK^0_SK^0_S$. They are determined to be ${mathcal B}(D^+to K^0_SK^0_SK^+)=(2.54 pm 0.05_{rm stat.} pm 0.12_{rm sys.})times 10^{-3}$, ${mathcal B}(D^+to K^0_SK^0_Spi^+)=(2.70 pm 0.05_{rm stat.} pm 0.12_{rm sys.})times 10^{-3}$, ${mathcal B}(D^0to K^0_SK^0_S)=(1.67 pm 0.11_{rm stat.} pm 0.11_{rm sys.})times 10^{-4}$ and ${mathcal B}(D^0to K^0_SK^0_SK^0_S)=(7.21 pm 0.33_{rm stat.} pm 0.44_{rm sys.})times 10^{-4}$, where the second one is measured for the first time and the others are measured with significantly improved precision over the previous measurements.