localhost not resolving to 127.0.0.1
My localhost is not resolving to 127.0.01, preventing me from opening files on localhost from my browser unless I manually enter 127.0.0.1. How can I get it to resolve correctly without hardwiring localhost (it should still adjust and update itself as necessary after this).
Context: conda base env, version 4.13.0, MacOS Monterey
Please see below for details, any help would be really appreciated!
(base) mehrkaur@Mehrs-MacBook-Pro ~ % ping localhost
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.099 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.109 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.110 ms
^C
--- localhost ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.048/0.091/0.110/0.025 ms
(base) mehrkaur@Mehrs-MacBook-Pro ~ % cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
MacBook Pro 15″, macOS 12.0