Viral infections are a major threat to the human population due to the lack of selective therapeutic measures. The morbidity and mortality reported worldwide are very alarming against viral pathogens. The proinflammatory environment is required for viral inhibition by initiating the host immune response. The host immune response fights these pathogens by secreting different cytokines. Interleukin‐17 (IL‐17) a proinflammatory cytokine mainly produced by T helper type 17 cells, plays a vital role in the regulation of host immune response against various pathogens, including viruses. However, dysregulated production of IL‐17 induces chronic inflammation, autoimmune disorders, and may lead to cancer. Recent studies suggest that IL‐17 is not only involved in the antiviral immune response but also promotes virus‐mediated illnesses. In this review, we discuss the protective and pathogenic role of IL‐17 against various viral infections. A detailed understanding of IL‐17 during viral infections could contribute to improve therapeutic measures and enable the development of an efficient and safe IL‐17 based immunotherapy.