The gut microbiota has an important role in health and disease. Respiratory viral infections are extremely common but their impact on the composition and function of the gut microbiota is poorly understood. We previously observed a significant change in the gut microbiota after viral lung infection. Here we show that weight loss during Respiratory Syncytial Virus (RSV) or influenza virus infection was due to decreased food consumption, and that fasting mice independently of infection altered gut microbiota composition. While the acute phase TNF-α response drove early weight loss and inappetence during RSV infection, this was not sufficient to induce changes in the gut microbiota. However, depleting CD8 + cells increased food intake and prevented weight loss resulting in a reversal of the gut microbiota changes normally observed during RSV infection. Viral infection also led to changes in the faecal gut metabolome during RSV infection, with a significant shift in lipid metabolism. Sphingolipids, poly-unsaturated fatty acids (PUFAs) and the short-chain fatty acid (SCFA) valerate all increased in abundance in the faecal metabolome following RSV infection. Whether this, and the impact of infection-induced anorexia on the gut microbiota, are part of a protective, anti-inflammatory response during respiratory viral infections remains to be determined.