I am developing a Google Chrome extension, and if the user goes to a site that doesn't exist, like thiswebsitedoesnotexist.com, I want the extension to redirect them to another page set specifically by me. I am not talking about sites that give 404 errors. I mean sites whose DNS server address cannot be found, so Google Chrome gives you it's standard error page.
I tried using window.location.href = *link*
, but that doesn't change the webpage. How can I get around this? Thanks in advance.