Washing you hands with warm water and soap for 20 seconds is the best way to prevent the spread of viruses and illness.
Using hand sanitizer is not a adequate substitute for hand washing, but may be used in conjunction with it.