I’ve found the best way to keep spiders out of my house is to keep other bugs out. If there’s nothing to eat they tend to stay outside.
Whatever it is that I do, there is always plenty of food available for the spiders. The mosquitoes here are almost unbearable - I don’t go outside without protection, whether it be spray or long clothing, really between May and October. They always find a way in even though we don’t keep windows open. It’s just much easier to let the spiders kill them all (they are surprisingly efficient).