The behavior of the two approaches is a bit different. DNS blocks whole sites. HOSTS files will block whole sites, but also will let you go to sites, and block their access to things like ads that are an annoyance-you just get an empty space that says “advertisement”. HOSTS files also let you pick your own good/bad guys, independent of what a DNS service might think. So use one or both depending on what you are trying to accomplish.