Answer the question
In order to leave comments, you need to log in
Is it possible to redirect from domain to domain via hosts file in Linux?
All the best!
Perhaps I did not quite correctly state the question, but I mean something like in the /etc/hosts file
127.0.0.1 localhost
e_e e_e.net
Answer the question
In order to leave comments, you need to log in
what you describe is called DNS suffix - specify the net suffix ping e_e and the system pings e_e.net
in linux resolv.conf is responsible for working with DNS
Is it possible to redirect from domain to domain via hosts file in Linux?No.
The hosts file was created when such a redirect could not work - there were no DNS servers (that's why it was created). And then it turned out that it was very inconvenient - and it was left only for compatibility.
I did not understand how "on the router in the DNS settings it is indicated that e_e is, say, 22.22.22.22". I see a lot of options for how this can be done.
Those computers that do not resolve this name - perhaps even use a different DNS server, not a router. The nslookup and dig programs will help you diagnose.
The "net suffix" advice is good. But not in all cases.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question