Yes, you can plant grass seed on hard dirt, but it may not be the most effective way to establish a healthy lawn. Hard dirt, also known as compacted soil, can prevent grass roots from penetrating deep into the soil, which can inhibit the growth and development of the grass. Before planting grass seed on hard dirt, it is recommended to loosen the soil first by tilling, aerating or breaking it up with a rake. This will create space for the roots to grow and access water and nutrients in the soil. Adding organic matter such as compost or topsoil can also help improve the soil's structure and provide a better environment for the grass seed to grow.