• TeddE@lemmy.world
    link
    fedilink
    English
    arrow-up
    22
    ·
    2 days ago

    This doesn’t work for a ton of sites. You can host multiple domains from one public IP, so if you go to the IP directly, the servers do not know which domain to use. Reverse proxy servers take advantage of this in home labs.

    Further this would make it so webmasters have to keep the same static IP forever, lest they alienate their oldest users’ bookmarks. Imagine a business being unable to change datacenters unless they’re willing to walk away from their customer base.

    Plus this gets even more difficult to read with IPv6 addresses. Would you want to bookmark something like https://[2a04:4e42:200::67]/ instead of http://xkcd.com/ ?

    • ouch@lemmy.world
      link
      fedilink
      English
      arrow-up
      21
      ·
      1 day ago

      There is an easy solution. We can just write all the IPs in a text file with easy to remember names!

      • TeddE@lemmy.world
        link
        fedilink
        English
        arrow-up
        17
        ·
        1 day ago

        Like a card catalog? Honestly, it would be nice if we could get copies of individual entries over a dedicated port - like 53.

        • ilinamorato@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          1 day ago

          Maybe you’re getting the joke and I’m not, or maybe you just don’t know, but every computer has a hosts file that it checks before checking DNS (though some browsers skip it by default, behavior you can turn off). If you have a domain in that hosts file, it will always point you to the IP you set for it. So, for instance, if you type 127.0.0.1 reddit.com into this file, then you’ll be sent to your localhost every time you try to go to Reddit, essentially blocking the domain on your computer.

          Or, more applicable here, you could find the IP of a page you want to visit that doesn’t have a domain name and assign it to whatever string of characters you want–the hosts file doesn’t even care about DNS TLD rules, so you could have it send you to your self-hosted image storage whenever you type in just “photos”, or to some dark web baguette forger’s site when you type in “carbs.gimmecarbs”.

    • BrownSugarBits@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      This doesn’t work for a ton of sites.

      I know that. Thats not the point. This isn’t about what a ton of sites want, this is about sharing how to connect to web servers that are actively being censored by governments.