Enables sequence-specific double-stranded DNA binding activity. Involved in defense response to bacterium; determination of adult lifespan; and ecdysis, collagen and cuticulin-based cuticle. Located in nucleus. Part of chromatin. Expressed in head neurons; hypodermal cell; pharyngeal cell; seam cell; and vulval precursor cell. Human ortholog(s) of this gene implicated in autosomal dominant nonsyndromic deafness 28 and posterior polymorphous corneal dystrophy 4. Is an ortholog of human GRHL1 (grainyhead like transcription factor 1); GRHL2 (grainyhead like transcription factor 2); and GRHL3 (grainyhead like transcription factor 3).