Food and feeder matching guide
Bird Feed Guide
Bird feed is not one thing: each seed, nut and fat draws a different set of birds, and Project FeederWatch — the Cornell Lab's decades-long feeder survey — has ranked them by what actually comes to the feeder 1.
The preferences below are FeederWatch's 1; the cleaning and disease rules are FeederWatch's too 12; window safety is from All About Birds 3.

Bird feed by seed: what each one attracts
Black-oil sunflower is the preferred food item for a wide variety of birds and among the favorite feeder foods of cardinals, chickadees, finches and sparrows 1. Safflower attracts cardinals and other big-billed birds, though most birds prefer sunflower 1. Nyjer (thistle), an imported seed, is popular largely for its ability to attract finches including American Goldfinch, Pine Siskin and Common Redpoll 1. Millet is a favored food of many smaller ground-foraging birds — a handful on the ground keeps juncos and sparrows happy — and cracked corn attracts doves, quail and sparrows 1. Milo is not a favorite of most birds and often goes to waste, so mixes heavy in it are poor value 1.
Beyond seed: suet, peanuts, nectar and grit
Suet is a good choice for attracting insect-eating birds; cages that open only from the bottom are starling-resistant but still let woodpeckers, nuthatches and chickadees feed 1. Peanuts: jays grab several whole ones and cache them, while chickadees, nuthatches and titmice do better with shelled pieces 1. For hummingbirds, one part sugar to four parts boiling water, cooled, with no red food coloring, which is harmful; orioles take a more dilute one-to-six mix 1. Grit — sand, small pebbles, crushed eggshell or oyster shell — helps birds grind food in the gizzard, and eggshell adds calcium birds need during nesting 1.
Match the food to the feeder as well as the bird. Tube feeders keep seed fairly dry and their short perches suit small birds while excluding grackles and jays; large hoppers let doves and grackles feed; trays attract most species and, near the ground, juncos, doves and sparrows 1. Sunflower chips — hulled pieces — leave no shells but spoil faster when damp, so offer less at a time 1. Millet in a hanging tube is mostly kicked out by finches; put it on a low tray or the ground where its birds feed 1.
Whatever the feed, keep it dry and fresh: clean feeders every week or two, more often in wet weather, discard wet or moldy seed, and if birds with swollen eyes or fluffed, lethargic postures appear, take feeders down for a couple of weeks and disinfect them 12.