Read and rate the best solutions below by giving them a "thumbs up".
You're not going to believe this. I went through quite a few websites, reading all the hints about getting rid of houseflies. One of them mentioned lavender amongst quite a few other options in one simple sentence. I latched onto the lavender idea when I remembered that I have a small bottle of Lavender Essential Oil in my cupboard and thought I'd try it, not that I really believed it would work.
My bedroom window is always open for any hungry stray cat that might find its way to my cats' bowls of dried catfood. I always cover the fish bowl immediately after my cats have eaten, but still there would be lots of flies buzzing around. In my study where they would land on my arms or on my computer and they would mostly be just too fast for me to swat them!
I put a few drops on an ordinary small piece of typing paper and put it in my room where I feed my cats. Now this is the you're-not-going-to-believe-this part! Within 5 minutes - as in almost immediately - all the flies were out the window! I was flabbergasted. So I put another small piece of lavender paper on my desk and the same thing happened. Then I went to the kitchen and put down one there. All the flies gone. One or two would come in the windows or door, fly around a bit and fly right out again! I had to laugh. I found a fly sitting on the kitchen counter and I brought the piece of lavender right up to its nose - so as to speak. It flew away like a bat out of hell. One thing is for sure, flies HATE lavender! And it's really so cheap too. Two or three oily drops on the paper spreads into a huge oily spot.
I am so thankful to who-ever posted this tip that I went through all the palaver to fill in all my details to be able to post on this site because I felt that the world should know :-) But, on second thoughts, this is a very nice website and I've bookmarked it.
Source: Someone, somewhere on the Internet.
By Ellabelle from Cape Town
To keep flies out of the house, plant some basil plants in a pot and place it on the board of the window. Flies move away because of the aromatic scent of the basil plant.
By MaryJane from Lachine, QC
I hate pesky houseflies, they drive me bonkers! I looked for a suitable tip and found one involving cucumber peelings! (Who knew?) Well, I put them on the windowsill last evening and I can report that they seem to be staying away. It's a good thing I can put my salad peelings to good use!
Source: Online somewhere but I can't remember the site, I looked through images on 'Google'
By Monique 
Give a "thumbs up" to the solution that worked the best! Do you have a better solution? Click here to share it!
Here are questions related to Getting Rid of House Flies.
Please has anyone any tips keeping flies out of the kitchen and living areas
By shi 
Just wait for it to land and then kill it.
Over the weekend (starting on Saturday afternoon) we opened our patio door. The screen door is always shut even when we close the glass door. Out of nowhere, there were approximately 15-20 flies on the screen on the inside. We sprayed the screen and the flies died. However, later that night, still in the kitchen there were about 10-12 more flies flying around the kitchen, but all seemed to be hanging around the sliding glass door. My question is: Where are the flies coming from and why all of a sudden? The more we spray the more they seem to come out.
By Debra W.
By Louise B. 07/04/2012
I once had flies inbetween the panes of glass on a window. Luckily, they were not sealed panes, and I could take the inner one off to get rid of the flies. Who knows how they get in? Not me! I suspect that flies can crawl into spaces and "hibernate" in the walls, and then crawl out at the oddest times.
House flies will not be breeding in your trash can or around your pet's food unless your house is full of something like rotten meat, which I seriously doubt. House flies have a fairly long life cycle - egg, maggot, pupae, and then adult fly. You'd certainly have noticed maggots somewhere I think. Your flies have likely come from outside somehow, and been laying low inside the wall,. Makes them sound like little spies, but that seems to describe their behaviour! LOL
By Tapestry Lady 07/02/2012
It might be that a fly has laid her eggs somewhere in your house and they've all reached maturity. One time I was absolutely swarmed with fruit fly-like bugs in the thousands (or it seemed to be!). I've never seen so many bugs. It turned out they were coming from the trashcan. I cleaned it out well under the lid and the bugs all soon died.
Maybe have a good clean around any potential food sources, cleaning out trash cans and areas where pets eat, things like that. They should be gone within a few days. If they're on the glass door they might actually be trying to get out, so you might have luck shooing them outside. Fly strips or traps might help too and be better for your lungs than spraying. Good luck!
How can you get rid of house flies?
By Tony from Nigeria
By Lee 09/04/2011
Just put everything away clean you sink, they will die in a day or two.
We just returned from a week's vacation to find flies all over the place! No one was in the house and I did not have them before we left, so we have no clue where they are coming from. They are so disgusting and dirty. Does anyone have any idea how to get rid of them aside from a fly swatter or vacuuming them? I'd like to spray something, but I don't want to use chemicals that might hurt the kids. Thanks!
By littlegamma 08/15/2012
I tried duct tape out of desperation with no luck. I then took a jar and filled it an inch or two with water with a drop of dish soap and a piece of raw meat. All the flies went into the water and drowned.
By Frugal Sunnie 08/04/2011
My husband uses a strip of duct tape to home make fly tape. He twists the strip, securing it to itself to maintain the twist, then sticks it up. It is beyond gross and works like a charm.
(But I'd rather be able to find the real fly tapes, lol! I haven't seen them here in the UK which is why I'm glad my husband knows how to turn a strip of duct tape into a fly tape:)
What is a good way to get rid of flies in the house?
By Debbie from Terre Haute, IN
By Dottie Baltz07/26/2011
I know it's gross, but those sticky fly tapes that you hang from the ceiling work pretty well. Once the flies are gone, make sure you seal up any cracks in your screens and doors to keep them from coming in again and wash the window sills with soapy water in case they have layed any eggs.
Flies, I hate those little pests. When I walk out my back door flies seem to be there waiting to come in. Maybe it's the air-conditioning. Is there any type preventative measure to keep them away?
By LeeAnne67 05/26/2011
Someone I know hangs a zip-lock sandwich baggie full of water over their doorway. He swears that it keeps the flies out of his house and he leaves his front door open and doesn't have a screen door. I have no idea if it works or even how or why it works, but I don't see any flies in his house.
As for the flies outside of your house waiting to ambush you. I'd call a plant nursery or an exterminator and ask questions as to what's causing it to happen all of a sudden. Good luck.
I can't get rid of all these house flies. I could get rid of them in the morning then later I have even more. I tried the wine in the pan with dishsoap, nothing happened. I have spent the last hour with a fly swatter, but I still have a good two dozen still flying around. I plan to buy fly paper in the morning. But what an I do now? Help.
By Debbie from Chicago, IL
By Louise B. 08/20/2010
If you are swatting these flies with a swatter, I am assuming they are regular houseflies. Likely using a swatter will do the job, and flypaper is good, too. The wine and dishsoap thing is for fruit flies, which are tiny.
If you have a sudden influx of flies, and you generally have none, you should try to figure out where they are coming from. On my grandpa's farm, there were always flies from the barn animals. We used to swat 50 to100 at a time, and next day there were just as many. But on a grain farm or here in town, I get one or two flies a month. You must figure out the source of these flies. If it is from farm animals, you can't do much, but if you ordinarily have none, you should look for some dead animal, rotting meat, something like that, someplace where maggots would thrive, and now show up as adult flies.