Spiders often enter through small openings around doors, windows, and the foundation. Seal cracks in walls, repair damaged screens, and add weather stripping where needed. Check areas where utility lines, vents, or pipes enter your home, and close any gaps with caulk or mesh. Door sweeps on exterior doors and making sure your windows are closed can also help prevent spiders and other pests from slipping inside.
Sometimes cracks form in the foundations of homes and buildings just from the settling which occurs. Often a spider infestation starts in the basement or crawlspace of a home, so regularly checking for holes, cracks and damage in that area is crucial for spider prevention.