I am trying to improve the production environment on my website's server. I notice that many sites do not have an IP address that is directly accessible, yet it looks like my site's IP is accessible. For example:
[lucas]$ nslookup professionalSite.org
Server: 208.67.222.222
Address: 208.67.222.222#53
Non-authoritative answer:
Name: professionalSite.org
Address: 192.12.345.102
[lucas]$ nslookup mySite.org
Server: 208.67.222.222
Address: 208.67.222.222#53
Non-authoritative answer:
Name: mySite.org
Address: 54.133.23.199
[lucas]$
In this example, when I enter the "192.12.345.102" IP (from professionalSite.org
) into my browser, it is invalid. On my site, when I enter "54.133.23.199" in my browser, it resolves to my site.
So, should I be concerned about serving incoming requests in this way? What are the pros and cons about the difference in "professionalSite.org" and "mySite.org"? How can I prevent requests directly to my static IP, similar to that of "professionalSite.org", above?
UPDATE
Here is a more concrete example:
[lucas]lucas$ nslookup craigslist.org
Server: 208.67.222.222
Address: 208.67.222.222#53
Non-authoritative answer:
Name: craigslist.org
Address: 208.82.238.129
When I navigate to 208.82.238.129
in my browser, I get a 404. But on my website, the site is served just fine. Why is this so? Is there an advantage to serving a 404 when the static IP is entered directly in the browser?
nslookup craigslist.org
returns an ip address of208.82.238.129
, but when I navigate there in my browser, I get a 404. How can I do the same for my site? Can this be something that I can configure on a web server like nginx?