The best time to get the HPV vaccine is before you start having sex. That's why the CDC recommends that both boys and girls get their vaccination at age 11 or 12, although they can get the vaccine as early as age 9. If you're 13 or older and you haven't already been vaccinated, you can still get the vaccine through age 26. The vaccine hasn’t been studied well enough for older people.