It is vital to harvest and store onions correctly, otherwise they will not keep.
When the onion foliage bends over and turns yellowy, it is almost time to harvest onions.

CenturionOnion leaf bent over
Leave them for two weeks, and then pull them out of the soil on a dry day.

onion leaves bent over
The bulbs must be mature if the harvested onions are going to be stored.
Leave the mature onions to dry and ripen, so that the skin becomes shiny, before they are stored.
It is well worthwhile making an effort to harvest and store onions correctly.