I recently started with a fresh installation of Fedora35/Gnome. While implementing I needed to adjust the DNS nameservers, but I am not aware of the best file to update. I started with /etc/resolv.conf and /run/systemd/resolve/stub-resolv.conf, but after having rebooted my modifications have been lost. Later I detected Changes/systemd-resolved - Fedora Project Wiki with hints regarding systemd-resolved. I updated /etc/systemd/resolved.conf , but updates there are ignored.
So where best to define DNS nameservers in my environment?
Use this for using a dns over tls
And for normal dns use
Use anything you like
For resolved.conf try unhash that you want to use and make dns over tls no to yes and save that you need sudo permission for doing this and save that file and reboot
For /etc/resolv.conf it is also same as that easy.