There are a variety of options available to assist in defending your base.
Ensure you constantly upgrade your weapons to the highest levels.
Never stop upgrading your turret weapons and walls.
You can build defense platforms on which you then mount base weapons and base specials.
You can also build walls to absorb damage from ballistic weapons (and explosive weapons with levels 5 through 7 walls).
The best ways of building defense structures is to combine them in such a way that will cause the attacking fleet to waste more time overwhelming them.
A common policy here is to encircle a defense platforms with walls (one terrain tile can host a tower in the middle and one wall layer circling the tower).
A double wall can also be useful, though it will require more planning and placement actions, because one terrain tile won't be enough for it.
However, with the miniaturization of the WHs and other buildings (the big Sept. 2014 game upgrade), double walls are easier to pull off (and since that Sept. 2014 date, MANY players are redesigning and refactoring their bases).