Every app submitted to the App or Play store already has to do this. If parental controls are on, then users cannot download those apps.
The only hard part for the web is that a site could lie since there is no gatekeeper, but some black lists can help with bad actors.