The best way to prevent yellow fever virus infection is to protect yourself from mosquito bites. Use insect repellent, wear long-sleeved shirts and pants, treat clothing and gear, and get vaccinated before traveling, if vaccination is recommended for you.