The nucleoid-associated protein H-NS is a global modulator of the expression of genes associated with adaptation to environmental changes. A variant of H-NS expressed in the R27 plasmid was previously shown to selectively modulate the expression of horizontally acquired genes, with minimal effects on core genes that are repressed by the chromosomal form of H-NS. Both H-NS proteins are formed by an oligomerization domain and a DNA-binding domain, which are connected by a linker that is highly flexible in the absence of DNA. We studied DNA binding by means of oligomer-forming chimeric proteins in which domains of the chromosomal and plasmidic variants are exchanged, as well as in monomeric truncated forms containing the DNA-binding domain and variable portions of the linker. Point mutations in the linker were also examined in full-length and truncated H-NS constructs. These experiments show that the linker region contributes to DNA binding affinity and that it is a main component of the distinct DNA binding properties of chromosomal and plasmidic H-NS. We propose that interactions between the linker and DNA limit the flexibility of the connection between H- NS oligomerization and DNA binding and provide an allosteric indirect readout mechanism to detect long- range distortions of DNA, thus enabling discrimination between core and horizontally acquired DNA.