Check McCormick’s web site for a chart on shelf life. (I don’t know why the URL is all numbers.) The link also provides tips for checking a spice’s freshness.
Though it’s more convenient to store your spices near your stove, keep them away from heat and moisture, since this can change the spices’ effects.
As you can see by my spice shelf, I have an assortment of things from dollar stores, discount grocers, etc. Spices rarely go on sale, it seems, and when they do, I like to replace whatever I need.
If your spices are bad, you aren’t doing your food any favors.