Optimal coordination of the protection devices (PDs) is performed here simultaneous with optimal allocation of them and the DGs. The PDs are a set of directional overcurrent relays (DOCRs) and voltage relays, each with its own fast switch (FS). In previous optimal DG placement studies the coordination of the PDs has been considered as a constraint. So, it was not possible to optimal coordination of the PDs simultaneously. In the present study, the coordination between the PDs is considered in calculating the value of the energy not supplied (ENS) that is a part of an overall cost function. The cost function considered here includes cost of purchase, installation, and maintenance of the DGs and the PDs, cost of the energy losses, cost of the ENS, cost of the purchased energy from the main grid and the DGs, and the penalty cost for emitting environmental pollutants. Here, output of the renewable DGs and the network loads during the year, in a 96‐h model, has been considered as variable. To solve the desired optimization problem, an algorithm based on evolutionary algorithms such as genetic algorithm (GA) is proposed. Finally, various cases have been simulated by considering a standard 33‐bus radial network.