When I bought my first flute, I did not know what I was doing and made a $350 mistake! It looked pretty and came from a reputable flute maker but the finger holes were too far apart for me to play it properly. I bought it online, I think the most important factor to consider when you buy online is to make sure that the flute maker has a reasonable return policy.
Tuning: There are several factors to consider in buying your flute. I think one of the most important is to make sure the flute is in tune. There are several good tuner apps you can download on your phone. Do not be afraid or embarrassed to take out a tuner app and check the tuning on the flute you may want to buy. In warmer weather the flute will be sharp and in colder weather the flute will be flat, it is a speed of sound physics thing. What you are looking for is consistency. If one note is tuned way off from the others that flute is not properly tuned.
Finger Holes: The finger hole spacing should be comfortable for you to reach. The lower the key, the farther apart the finger holes need to be for proper tuning. If you have small hands, you may want to start with the key of A or G since the finger holes are closer together. The size of the holes will vary when the finger holes for each hand are equal distant apart. Size is usually not an issue.
Ease of Playing: The back pressure when you breath into the flute should be comfortable for you and what is right varies from player to player. The important thing to look for is being able to play all the notes comfortably without running out of breathe.
Overblowing: When you play the bottom note with all the finger holes covered, sometimes the note will jump to the next octave. Beginners have a problem with overblowing anyway, so you do not want a flute that overblows easily. The flute should not overblow when you are breathing normally into the flute.
Craftsmanship: You want a flute that is well made with attention to detail. Is the bore round and the walls an even thickness? Are the finger holes clean and round? is the TSH square and the edges sharp and clean? Does the edge of the block line up with the edge of the TSH?
Esthetics: Is it pretty? Some people pick a flute because it looks beautiful but find out it is only good as a decoration on the bookshelf and not as a musical instrument. Pretty is great as long as the flute is made well and is in tune.
Everyone has there favorite criteria for buying a flute, but I hope these suggestions will help you make a wiser choice when you buy your flute.