We investigated the influence of a Wnt5A–gut microbiota axis on gut B-cell repertoire and protection from infection, having previously demonstrated that Wnt5A in association with gut commensals helps shape gut T-cell repertoire. Here, WNT5A is linked to infection.