Most houses are easily defendable. First thing you should do if you're in a two-story house is get up the stair case and then destroy it. If you do not live in a two story house, the attic will be serve as a secure substitute. Neverf use a basement for shelter. Burning, suffocating, or simply starving to death is as real a possibility as being eaten alive. If you can make it on the roof, you should be safe from the dead, but have to deal with the elements. Keep still and keep silent to avoid attracting zombies to your location. Remain put until either you exhaust your supplies or are forced to run.
Given their lack of windows, easily secured entrances, and generally spacious layouts, warehouses can be an ideal refuge for an extended period of time. many warehouses have a security office, break rooms with food, bathroom facilites. If its a storage wearhouse, heavy crates can be used to fortify your location. Be aware of refrigerated warehouses storing perishable goods. Once elctricity is lost, their quick decomposition can become a severe health hazard.
Although designed to keep the living in, correctional institutiions can also be more than efficient in keeping the dead out. Behind high barbed-wired walls, each pod or cell block is like a seperate prison inside the prison. Most are equiped with state-of-the-art surveillance systems and stocked with food rations. Assuming you can get inside this could be an ideal location to hold-up. However you should be always be aware of the prison's lingering inhabitants who could prove to be hostile.
This should be your top priority when searching for a safe haven. Many are located in rural areas. Almost all have miles of security fences and maintained perimeters. Most operate like small cities, fully equiped with every need. Because military bases have so many means of communication they would undoubtidly be the last places around the world to loose contact with one another. More importantly than all of fortifactions surrounding a base are men and women inside of it. Soldiers are highly-trained in combat, even a few well-supplied troops would be able to fight off a large horde. Not only that, but many of these people live with their families on base and would do anything to defend them.