An earplug and method for attenuating sound. An acoustic canal extends straight through a housing to guide the sound inside an ear canal. The acoustic canal comprises a canal section dimensioned to fit at least partially inside the ear canal. The canal section ends at one side in a first exterior opening to let the sound into the ear canal. Another side of the canal section transitions into a first resonance volume with a relatively wide diameter. A second resonance volume ends at one side in a second exterior opening and, the other side being separated from the first resonance volume by a sound attenuating mesh. This provides resonance cavities that compensate attenuation of the mesh over a wide range of high frequencies.