It's been done. Here are a couple of examples:
https://en.wikipedia.org/wiki/Internet_Content_Rating_Associ...
https://www.rtalabel.org/page.php?content=howtofaq
Use of those kinds of headers needs to be voluntary for websites, which means that censorware has to block any site that doesn't return the header, not just those sites where the value of that header indicates adult content. That will encourage websites to support the header or risk being auto-blocked by any censorware in use, but that's a problem for the RTA header since it only indicates adult content.