Look at Ad Free Time. You have to have certain routers. I don't use a Chromecast or any other device like a Roku, so dealing with them is an unknown for me.
DD-WRT firmware (done via hosts file).
You can also runs pixelserv that will return a 1 pixel image so you don't get any errors.