Seal openings. The best way to rid yourself of spiders and centipedes is to prevent them from entering your place in the first place. Caulk or seal spaces around doors and windows, or anywhere that would allow insects to enter. Install windows and doors that shut tightly. Don't worry about trapping spiders and centipedes already in your place; it's more important to prevent more from coming in.
Place deterrents around the home. Apply insecticides on doorsills, windowsills, baseboards or any other areas where insects can enter, either from outside or from the basement. Insecticides come in liquid, aerosol and dust form. Sprays work well against exposed centipedes and spiders, while dusts work well for spacious, vacant rooms. Take special note of product instructions.
Vacuum any visible spider webs, egg sacs or even the spiders themselves. Then dispose of the vacuumed contents outside. Keep your house clean and avoid leaving food sitting on countertops. By denying spiders and centipedes a food supply, you'll hopefully inspire them to move elsewhere. Sweep and dust often.
Remove clutter. Move away piles of papers, boxes or any junk that would seem inviting to spiders or centipedes in all areas of the home. Centipedes especially prefer damp areas, and both spiders and centipedes like the dark.
Take away materials that shelter centipedes and spiders outside the home. Don't allow mulch, wooden boards or other materials to pile up next to the home. Dethatch your lawn regularly to promote a drier lawn, since centipedes especially prefer dampness. But some spiders, such as the black widow, prefer drier spots, as they are found in dry piles of lumber or firewood. Spray insecticide near these areas -- not on the wood -- if needed.