Maternal gut microbiota composition contributes to the status of the neonatal immune system and could influence the early life higher susceptibility to viral respiratory infections. Using a novel protocol of murine maternal probiotic supplementation, we report that perinatal exposure to () or () increases the influenza A/PR8 virus (IAV) clearance in neonates. Following either supplementation, type 1 conventional dendritic cells (cDC1) were amplified in the lymph nodes leading to an enhanced IAV antigen-experienced IFN-γ producing effector CD8 T cells in neonates and IAV-specific resident memory CD8 T cells in adulthood. This was compatible with a higher protection of the offspring upon a secondary infection. Interestingly, only mice born to supplemented mothers further displayed an increased activation of IFN-γ producing virtual memory CD8 T cells and a production of IL-10 by CD4 and CD8 T cells that could explain a better control of the lung damages upon infection. In the offspring and the mothers, no disturbance of the gut microbiota was observed but, as analyzed through an untargeted metabolomic approach, both exposures modified neonatal plasma metabolites. Among them, we further demonstrated that genistein and 3-(3-hydroxyphenyl)propionic acid recapitulate viral clearance or cDC1 activation in neonates exposed to IAV. We conclude that maternal or supplementation confers the neonates specific metabolomic modulations with a better CD8 T cell-mediated immune protection against IAV infection.