The selective recognition of nanoparticles (NPs) can be achieved by nanoparticle-imprinted matrices (NAIMs), where NPs are imprinted in a matrix followed by their removal to form voids that can reuptake the original NPs. The recognition depends on supramolecular interactions between the matrix and the shell of the NPs, as well as on the geometrical suitability of the imprinted voids to accommodate the NPs. Here, gold NPs stabilized with citrate (AuNPs-cit) were preadsorbed onto a conductive surface followed by electrografting of p-aryldiazonium salts (ADS) with different functional groups. The thickness of the matrix was carefully controlled by altering the scan number. The AuNPs-cit were removed by electrochemical dissolution. The recognition of the NAIMs was determined by the reuptake of the original AuNPs-cit by the imprinted voids. We found that the recognition efficiency is a function of the thickness of the NAIM layer and is sensitive to the chemical structure of the matrix. Specifically, a subtle change of the functional group of the p-aryldiazonium building block, which was varied from an ether to an ester, significantly affected the recognition of the NPs.