Many viral pathogens cycle between humans and insects. These viruses must have evolved strategies for rapid adaptation to different host environments. However, the mechanistic basis for the adaptation process remains poorly understood. To study the mosquito-human adaptation cycle, we examined changes in RNA structures of the dengue virus genome during host adaptation. Deep sequencing and RNA structure analysis, together with fitness evaluation, revealed a process of host specialization of RNA elements of the viral 3'UTR. Adaptation to mosquito or mammalian cells involved selection of different viral populations harvesting mutations in a single stem-loop structure. The host specialization of the identified RNA structure resulted in a significant viral fitness cost in the non-specialized host, posing a constraint during host switching. Sequence conservation analysis indicated that the identified host adaptable stem loop structure is duplicated in dengue and other mosquito-borne viruses. Interestingly, functional studies using recombinant viruses with single or double stem loops revealed that duplication of the RNA structure allows the virus to accommodate mutations beneficial in one host and deleterious in the other. Our findings reveal new concepts in adaptation of RNA viruses, in which host specialization of RNA structures results in high fitness in the adapted host, while RNA duplication confers robustness during host switching.