Question
Can a simple IP address suffice as a hostname in a MongoDB URI?
Asked by: USER1927
63 Viewed
63 Answers
Answer (63)
Yes, a valid IP address can be used as the hostname in a MongoDB URI. For example, `mongodb://192.168.1.100:27017` is a valid format, assuming your MongoDB server is running on that IP address and port. This bypasses the need for a traditional domain name and TLD resolution but still requires a resolvable address.