Plundering a city is mostly about getting resources. To make a city plunder proof all you really need to do is to make sure any plunder is non-profitable. The easiest way to do this is to build a level 10 moonglow tower. If you have 2 level 10 lookout towers you’ll likely have enough notice to either ship out your resources or just purify them right before the plunder. When the plunderer arrives he or she will get a big fat zero for their trouble.
Hideouts can also be useful if you happen to be in a highly contested area where you don’t want to purify away all of your resources. A level 10 hideout can protect 15,000k of each resource. The problem with hideouts is that it takes a lot of them to protect any substantial amount of resources and its usually more useful to spend those resources and build slots on actual production buildings.
Keep in mind that plundering can also be an offensive tactic designed to disrupt production. In that case you may need to consider a different approach to defending against the plunder. It may be an opportunity to cost the attacker some resources in the form of dead troops. Also keep in mind that any counter attack can reveal valuable information about your troops to the plunderer.
Alternative technique for players with Trade Ministers
There is an alternative technique if you have a trade minister that will make your city 100% plunder proof. This technique should only be executed after your city is complete.
The normal behavior of the trade minister is to ship out resources in increments of 100,000. But this behavior is dependent on a level 10 town hall. If you downgrade a town hall form level 10 to 9 the trade minister will start shipping out resources in increments of 20,000. With your target settings at 0 then your trade minster will ship out resources when they reach 20,000. This combined with two level 10 hideouts (which will protect 30,000 of each resource) means that your city will never be able to be plundered.