Flies are generally drawn to foul odors like garbage, rotting foods, waste, and dirty drains. Flies are also attracted to outdoor lighting, and can enter a home through broken screens or entry points.
Better Homes & Gardens on MSN

How to get rid of drain flies (for good!)

Learn how to get rid of pesky drain flies once and for all, so they never bother you or your home again.
After the long winter months, many of us are quick to welcome spring and summer with open arms. However, it can be difficult to enjoy the sunshine when it comes with an influx of flies. Fortunately, ...