Defending is never a comfortable situation to be placed in; screw up and your economy is right there to be damaged and you have lost the game. Nevertheless, there are circumstances in which being in the defending position is to your advantage, provided you know how to defend.
In an open map where two opposing armies meet, counter units become really important, however, in an environment where you are at your base, possibly where walls are are being used, potentially not, certain liberties, like using low-mobility units like monks and mangonels can be used, or even defensive towers may be ideal. The key to defending is being aware of how the opponent is being aggressive and adapting to that.
How to defend against a knight rush?
When your opponent makes knights, the go-to unit should always be monks. Nothing makes an opponent more timid than attacking uselessly the walled-base of an opponent as they hear that iconic “wololo” at their demise. If there are too many knights for a few conversions to pay off, you should add some pikemen to guard where the units will break through. This is not a waste to invest in pikemen, as if a player is making mass-knights, it is too expensive for a transition to occur without it having made a significant economic effect. Likely, they would have researched bloodlines, feudal and castle age armor at the blacksmith and husbandry. Having a few monks at your walls discourages a player from sending only a few knights to attack, and therefore creates the trap of having a player over-invest into cavalry. Further, never underestimate the ability to house-wall behind melee aggression to your walls. Even where your base is not walled, using a few pikemen as meat-shield in front of your monks really causes alarm to an opponent.
How to defend against crossbowmen?
Where an opponent pushes with crossbowmen or mangonels, immediately place a defensive siege workshop. While players may be able to out-micro mangonel shots these days, the attention a player must give to this causes so much time away from fixing their own economy or from genuinely being affective with those units, meaning that you can prepare for your proper counter. If the player is doing straight crossbowmen, then place that siege workshop, make a mangonel, and start massing and upgrading skirmishers. If the push is a siege-pike push, then after making a mangonel to buy time, invest in redemption if that is an option for your civilization and convert future mangonels. Also produce another mangonel to deal with the pikemen. Pikemen are not that strong a unit so you should not place too much fear on having them in your economy alone, and they can be easily dealt with, however they are effective against countering cavalry, which can be used against siege effectively. If you are not able to research redemption, make defensive towers and research guard tower. These are quite effective in protecting from mangonels, especially with garrisoned villagers or skirmishers, which, when ungarrisoned, are effective against the pikemen.
How to defend against a siege-monk push?
If the player does a siege-monk push but does not produce any spear/pikemen, take the liberty to produce light cavalry, as these are resistant to monks, have a bonus against monks, and can close the gap on siege fairly effectively. Alternatively, if you have the time to make the fortifications, opt to build a few guard towers. This can be slow as you may need to force up a university for the upgrade, and the watch towers themselves.
How to defend against skirmishers?
Skirmishers can be easily dealt with by using mangonels, scorpions, or cavalry. Consider what is accompanying the skirmishers when making this decision. If it is cavalry but you are walled, pick the onager route. If it is pikemen, a few scorpions may be more effective. If the player accompanies them with crossbowmen, either skirmishers (placed in front to take hits) and a mangonel or a few scorpions behind should suffice, or if you have bloodlines and have invested into cavalry, straight cavalry or cavalry mixed with scorpions are effective.
How do I defend an archer rush?
Archers can be met with towers, as these have more range and can deal considerable damage to archers, however, be aware that making a tower places considerable affect on your ability to boom if that was your intention, as you use 125 of your 200 stone, where 100 is needed for each additional town centre.
Skirmishers are also quite effective, however, as the production of skirmishers require food (for the unit and the much needed armor upgrade), your uptime to the next age will be delayed. Good macro players know how many skirmishers are necessary to make to fend off an archer rush, while still ensuring a good castle time.
What do I do against a tower rush?
If a player is tower rushing you, placing a counter tower is necessary when the player is attempting to block you out from an important resource, like berries, gold, or in particular, stone (as additional stone is needed when counter-towering after the first tower. Counter towering is also the play when an opponent has a military advantage and is trying to bust through your walls or is not willing to send that military forward. If the opponent is making their first or second tower, and they DO NOT have significant military advantage, it may just be worthwhile sending a number of villagers forward to batter down the towers and to fight off the opponents villagers.
When defending, understand that the player executing this has built their economy towards the attack and therefore you need to stall out their attack to keep up with their efforts. Monks and siege are effective at this.