The best way to prevent hepatitis A is through vaccination with the hepatitis A vaccine. To get the full benefit of the hepatitis A vaccine, more than one shot is needed. The number and timing of these shots depends on the type of vaccine you are given.