In most civilized countries serious attempts are made to control and eradicate rats, and in some places regular inspection of properties is required by law.
All means of access should be made secure against rats. Windows should either be completely glazed or fitted with galvanized wire netting with a mesh of 1-2 cm, the wire itself having a diameter of at least 0.7 mm. Ventilation ducts opening to the outside should also be fitted with netting. Doors should close tightly and any holes or cracks in the floor and walls should be filled with cement.
Holes made in walls for pipes and ducts must be covered with a close-fitting plate or secured with netting and cement.
Holes should be fitted with rat proof covers, and drainpipes from the roof and outlets from the kitchen sink should also be inspected to ensure that they are not providing access routes for rats.
Rats that manage to get into houses very often enter via the drainage system, either because the drains are old and crumbling, or because the new drains have been installed poorly.
Naturally rats cannot enter if the drains are below a well-cemented cellar floor, but if there is a badly finished join between the floor of a room and the earth they will often manage to dig their way up.
When the presence of rats has been confirmed the normal practice is to put down poison, but if they are under the floors it would be better to catch them in traps, as dead rats produce a dreadful smell.