Ideally, people should get the vaccine before they are sexually active. This is because the vaccine is most effective in people who have not yet acquired any of the four HPV types covered by the vaccine. People who have not been infected with any of those four HPV types will get the full benefits of the vaccine.