Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I wanted to know about all the subdomains for a test domain, for example.com to localhost. Is there any way to point any requests on *.example.com to resolve to 127.0.0.1

1 Answer

0 votes
by (36.8k points)
edited by

Usually /etc/hosts file doesn't support any wild card entries.

You need to use services like dnsmasq. To enable it in the dnsmasq, just edit the 'dnsmasq.conf' and add this line:

address=/example.com/127.0.0.1

To know about Linux join the Linux training 

Do check out the video below

Related questions

0 votes
1 answer
0 votes
1 answer
asked Dec 5, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...