This is a prime indicator of irritation, probably an allergy. It can even be food allergy, like wheat, corn or soy. Try changing foods to turkey or lamb and rice.
This usually means that the dog is itchy. The causes can be from allergens in the environment. Also from something the dog is allergic to such as dust,perfumes,cleaners or food related.
He could have some sort of allergy or ear infection or eye infection that is causing him to rub his head on things to relieve the discomfort. He shold be taken to the vet to rule out any infections.