Lipopolysaccharide (LPS) O-antigen (O-Ag) is known to limit antibody binding to surface antigens, although the relationship between antibody, O-Ag and other outer-membrane antigens is poorly understood. Here we report, immunization with the trimeric porin OmpD from Salmonella Typhimurium (STmOmpD) protects against infection. Atomistic molecular dynamics simulations indicate this is because OmpD trimers generate footprints within the O-Ag layer sufficiently sized for a single IgG Fab to access. While STmOmpD differs from its orthologue in S. Enteritidis (SEn) by a single amino-acid residue, immunization with STmOmpD confers minimal protection to SEn. This is due to the OmpD-O-Ag interplay restricting IgG binding, with the pairing of OmpD with its native O-Ag being essential for optimal protection after immunization. Thus, both the chemical and physical structure of O-Ag are key for the presentation of specific epitopes within proteinaceous surface-antigens. This enhances combinatorial antigenic diversity in Gram-negative bacteria, while reducing associated fitness costs.