When I click links in lemmy comments that explicitly include http in the url, the resulting page is always https. To me, the preferred behavior would be to default to https if no protocol is specified, but to respect the user’s preference if given.

Most of the time, there is no downside to changing to https, but some sites will result in an error if they don’t properly support https (I’ve encountered this when incorrectly typing a url before, but as it was not recent I don’t recall the details), and in rare cases the same domain name may serve different content on http vs https, making the ability to specify when linking desirable.

For example, http://xkcdsw.com is an archive of fan-edited comics, while https://xkcdsw.com is some kind of crypto site. While obviously that’s dodgy on the site end, it’s also strange to be completely unable to link the former without telling people to manually remove the s.

Is this redirecting happening on the app level, or the instance level, or something else? It’s not unique to me, as I was first alerted to it by replies that were confused at my links not going where I said they went.

Edit: to be clear, my question is whether Jerboa changes all http links to https links and if so why. The two responses so far do not address this question. If you wish to instead focus on whether the links I provided as an example work the way I claimed, then at least visit them first (using a browser for the http, as jerboa may change the url). If you wish to explain to me what a protocol is, first note that I already referred to the concept by name in my original post. However, my question is what is causing http links to be opened as https links.

Edit 2: when this post was about 6 hours old, xkcdsw fixed its weird configuration (I talked with two9a about it over mastodon). So that example no longer applies, but if interested there are comments below confirming that it wasn’t just me.

  • Transient Punk@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    3
    ·
    7 months ago

    For example, http://xkcdsw.com is an archive of fan-edited comics, while https://xkcdsw.com is some kind of crypto site.

    That’s not how URLs work. If that’s the behavior you’re experiencing, you likely have been the victim of malware/a virus.

    The first part of the URL is the scheme, which indicates the protocol that the browser must use to request the resource (a protocol is a set method for exchanging or transferring data around a computer network). Usually for websites the protocol is HTTPS or HTTP (its unsecured version). Addressing web pages requires one of these two, but browsers also know how to handle other schemes such as mailto: (to open a mail client), so don’t be surprised if you see other protocols.

    -Source

    • wander1236@sh.itjust.works
      link
      fedilink
      arrow-up
      11
      ·
      edit-2
      7 months ago

      I mean technically it’s possible to have different sites on http:// and https://, since the conventional ports are different (80 and 443), but it’d be a pretty weird thing to do.

      Edit: I just visited the links and the http:// one does indeed go to an xkcd-style site, while https:// has some dogecoin tracker with a broken SSL certificate.

      Edit again: the SSL certificate is for dogecoinaverage.com, so I have a feeling this person just misconfigured their nginx or Apache instance.

      Yet another edit: the maintainer’s Mastodon is linked on the xkcd site, which links to their GitHub, which includes the source for the Dogecoin average site: https://github.com/Two9A/dogecoin-average. Definitely just a weird misconfiguration.

      • randomsnark@lemmy.mlOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        7 months ago

        Thanks for looking into this thoroughly, and for correctly noting what’s causing the situation with my specific example.

        I contacted Two9A about his weird configuration before I made my original post, but have yet to get a reply from them. The specific example of xkcdsw is a separate issue unrelated to jerboa.

        My main question was what is causing http links opened on lemmy through jerboa to redirect to https links - whether that is being done by the app or the instance or what. If it is the intended behavior of the jerboa app, I’m curious as to why it doesn’t leave the protocol up to the commenter.

    • randomsnark@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      7 months ago

      Did you click the links before telling me that’s not how it works though? Other people are reporting the same result. I also get the same result on both my phone and desktop. Seems like two clicks would be less trouble than finding sources to back up a condescending and inaccurate response.

      Here is some information supporting the fact that URLs can work that way (although the two links you quoted but did not click on from my original post already demonstrate that): https://superuser.com/questions/792202/different-website-at-https-then-at-http

      Edit: bear in mind that to reproduce the behavior, you might need to type the http into your browser manually if you are using jerboa.