Houseflies are the most common and most annoying insects, flies enter the home easily through window or any doors so make sure the windows are sealed and your house is kept clean with proper hygiene. You can easily whack the flies with the fly swatter but that is not the ideal solution.
Flies hate the smell of strong essential oil and the best way to trap houseflies with this remedy is as follows:
Add 5 drops of dish washing liquid and 2 tsp of vinegar, mix it well and keep it in a tall glass covering a plastic wrap or a cling film with rubber band and poke small holes on top of it such that the fliens can enter these holes. The fly gets attracted to the smell of the mixture and gets trapped inside the glass.