Spiders are commonly attracted to musty smells caused by dampness or even sweat, according to studies. As a result, it is a good idea to keep your home clean and well-ventilated using a dehumidifier or open windows to help deter pests from entering your home.