In summary, we found that deletion of FoxN1 in K14-expressing thymic medullary epithelial cells reduces the number of naïve T-cells, decreases the antigen-specific CD8+ T-cell and B-cell response during influenza infection, and increases lung injury, weight loss and mortality. Here, KRT14 is linked to influenza.