The HPV vaccine is recommended for both males and females. It is ideally administered before any sexual activity begins, typically at ages 11 or 12, but it can be given as early as age 9. Catch-up vaccination is recommended for males up to age 21 and females up to age 26 if they were not vaccinated earlier. In some cases, it can be given up to age 45, but the benefits decrease with age.