The mistake that most people make with potted rosemary is that the soil is too rich and holds too much water. They can survive very nicely over the winter indoors, but make they get sunlight, and don't over water. Now, that doesn't mean no water, just make sure the top of the soil gets dry and that the pot has excellent drainage. And if you used a potting soil with fertilizer like Miracle Grow, I would recommend repotting. If you have to use Miracle Grow, use the cactus and succulent mix.
Like Gloria, I live where I can grow rosemary outside year round. I have several scattered around the yard. The ones that are on the low side of the yard, the side where the natural drainage of water flows, are decidedly smaller and don't do as well as the ones in the sandy high points. Rosemary really hates having wet feet.
Putting them in a cool well lit room like a sun porch works well, they go fairly dormant until taken back outside. And don't forget to harden them off when they do go back outside, just because they're evergreens doesn't mean they can't get some sunburn.
Remember, too, that as with any plant brought in from the outside, aphids can be a problem. They're not as apparent on a plant like rosemary, but they can kill one. Since I avoid insecticides as much as possible, I take all my over-wintered plants into the shower a couple of times and rinse them carefully with a hard stream of tepid water, really getting into the crevices around buds and where the leaf attaches.