Labs - DNS - networking basics

Could someone help me with the last exercise on this labs task?

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 .

My steps:

sudo vi /etc/resolv.conf
i
search yahoo.com
Esc
:wq

Am I missing anything?

Offhand, that might work, although it could have side effects. Could you supply a link to which lab you’re doing this in?

I’m getting the same problem, this is the lab https://kodekloud.com/topic/bootcmp-labs-dns-3/**strong text**

I just checked this lab and if you add search yahoo.com at the top of the /etc/resolv.conf file and save it, then the task passes validation.