On host01 we want to resolve name news to news.yahoo.com automatically without hard coding its entry in /etc/hosts file. Add the required changes on host01

am not sure what am doing wrong

This looks to be a lab. Could you please give us a link to the lab, so we can check this out for you?

sure : Udemy Labs: The Complete DevOps Bootcamp Course | KodeKloud

Not sure why you aren’t validating in the grader. My version of /etc/resolv.conf is the following; it validated.

search stratos.xfusioncorp.com
nameserver 127.0.0.11
nameserver 8.8.8.8
search yahoo.com
options ndots:0