Taking advantage of the protection effect of single-stranded DNA oligonucleotides, gold nanoparticles (AuNPs) remain dispersed and retain a red color with the addition of a low concentration of salt, while AuNPs would aggregate in the presence of double-stranded DNA. This difference has been used to design label-free colorimetric sensors for DNA detection. NaCl is the most commonly used salt to induce the aggregation of AuNPs. In this work, we aimed to test if other salts can provide even better sensor performance and to understand the effects of the cations and anions in salts. We first studied the effect of anions, including halides (NaF, NaCl, NaBr, and NaI), and other common salts (NaNO3, NaClO4, Na2SO4, Na2S2O3, sodium phosphate, and sodium citrate). Among them, weakly adsorbing ones such as F-, citrate, and phosphate appeared to yield better sensitivity than Cl-. Anions can directly adsorb on the AuNPs and affect DNA adsorption. We then tested cations, and only group 1A metals (LiCl, NaCl, KCl, RbCl, and CsCl) can signal DNA adsorption, while divalent metals (MgCl2, CaCl2, MnCl2, and NiCl2) barely showed the effect of DNA. CsCl only works for strongly adsorbing DNA, such as A15, but not weakly adsorbing T15. Overall, NaF is a better salt than NaCl by having a 2.3-fold higher sensitivity, which was confirmed in a DNA sensing assay. This work has identified a better salt yielding higher sensitivity, and sensing work relying on the change of the aggregation state of AuNPs can benefit from this study.