Corrosion is the most common cause for a magnet failing. If you are using magnets outdoors, or in an environment in which they are likely to come into regular contact with moisture then you need a material that won’t rust. Here, you will find a range of ferrite magnets, samarium cobalt magnets, alnico magnets and flexible magnets that all have excellent resistance to corrosion without any further coating or protection. Magnets that are susceptible to corrosion are often plated to give some protection, however this is often not enough to withstand continued use in moist environments, the magnets may look fine on the outside but could be rusting from the inside out.
Samarium cobalt magnets are made of an alloy with very little iron content, which gives them their superior resistance, while ferrite (ceramic) magnets are made from iron-oxide which is commonly known as rust and therefore won’t corrode further once manufactured.