I had ads and redirects via ads.matte.com on many devices on the network including android phones, PC's and IPads. I found out that going through a VPN service fixed the problem completely but didn't want to run a VPN service on all devices.
The solution for me was similar to some other contributors but very simple to do. All devices used DHCP from the main router. I checked the DNS settings within the Internet settings (not DNS within DHCP settings, this should be the same address as your main router gatweway address, commonly 192.168.0.1 etc.), and usually the Internet DNS servers would be provided by your ISP or you may be using google 184.108.40.206 or another DNS service.
In my case I didn't recognise the DNS server number so I looked it up and it turns out to be some Eastern Block country with the website friendhosting.net using IP 220.127.116.11 . I changed the DNS server to google 18.104.22.168 and cleared the cache and cookies from the browser in my PC and the problem was fixed. I cleared the cache and cookies an a couple more devices and this immediately fixed the problem on these devices too.
On one device I deliberately didn't clear the cache to see what happens and I went straight back to rubbish served by adsmatte.com . I then cleared the cache and cookies on this device and the problem was fixed immediately. The same fix was applied for the remaining devices and the network is back to normal.
One point to note - I logged onto a different network whilst having this problem and the problem remained, which made be think the problems was mainly due to a hijacked browser. I think what happened here was that the cache and/or cookies were still causing the problem and had I thought to clear them once connected to this other network then the problem would have probably been fixed too, providing their router had not been hijacked too.
So how did the router address get changed? The problem network is another family members so I've no idea what they may have done or downloaded but it's fixed for them now. As a bit of added protection I changed the DNS to OpenDNS (22.214.171.124 and 126.96.36.199) and it works really well.