Researchers writing in The Lancet tested it on around 16,000 households in the UK during the winter flu season.
They found a 14% reduction in general risk of infection and a 20% lower risk of catching flu in those who used it.
This group also visited their GP less and needed fewer antibiotics.
Most people wash their hands five or six times a day, but Prof Paul Little, from the University of Southampton, who led the research, said that if that could be increased to 10 times a day it would have an important effect on reducing the spread of bugs and infections.
Previous research has shown that infections in adults could be prevented if they washed their hands more often and reduced their ‘viral load’.
This would be of particular benefit to people who do not want to catch flu, such as those with heart or lung problems or the elderly.
The programme, called PRIMIT, has four weekly sessions which explain the medical evidence behind regular hand-washing.
It encourages users to learn simple techniques to avoid catching and passing on viruses and to monitor their own hand-washing behaviour.
Those using the programme in the study were followed for 16 weeks and asked to fill in a questionnaire afterwards.
Prof Little said that because most households now have access to the internet, the programme could be a good source of health information in a pandemic and help prevent the NHS from being overwhelmed.