Using a data sample of $e^+e^-$ collision data with an integrated luminosity of 2.93 fb$^{-1}$ taken at the center-of-mass energy $sqrt s= 3.773$~GeV with the BESIII detector operating at the BEPCII storage rings, we measure the absolute branching fractions of the two-body hadronic decays $D^+to pi^+pi^0$, $K^+ pi^0$, $pi^+ eta$, $K^+eta$, $pi^+eta^prime$, $K^+eta^prime$, $K_S^0 pi^+$, $K_S^0 K^+$, and $D^0to pi^+ pi^-$, $K^+ K^-$, $K^mp pi^pm$, $K_S^0 pi^0$, $K_S^0 eta$, $K_S^0 eta^prime$. Our results are consistent with previous measurements within uncertainties. Among them, the branching fractions for $D^+topi^+pi^0$, $K^+pi^0$, $pi^+eta$, $pi^+eta^prime$, $K_S^0 pi^+$, $K_S^0 K^+$ and $D^0 to K_S^0 pi^0$, $K_S^0 eta$, $K_S^0 eta^prime$ are determined with improved precision compared to the world average values.