• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Web GUI Auto Redirect HTTP Connection to HTTPS

Scheduled Pinned Locked Moved webGUI
6 Posts 3 Posters 3.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    SgtKilgore406
    last edited by Jan 21, 2020, 6:25 AM

    Hello,

    I am running my pfSense web GUI on a non standard port. Everything works fine until I forget to manually specify https:// in the url before I hit enter. When that happens, I get the message shown in the image below.

    Screen Shot 2020-01-20 at 11.20.57 PM.png

    How can I make pfSense automatically redirect whatever I put in (local domain name or IP address of the firewall) from HTTP to HTTPS automatically? Is this something that would require editing a .htaccess file or the webpage config file? Any help would be greatly appreciated!

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jan 21, 2020, 1:13 PM

      It does that automatically when you connect to the http server, like the default on port 80. If you do http://<firewall> it redirects to https://<firewall>:port. However if you manually put in http://<firewall>:<https port> there is nothing that pfSense or the browser can do. You explicitly told it to do the wrong thing.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      S 1 Reply Last reply Jan 21, 2020, 11:19 PM Reply Quote 1
      • S
        SgtKilgore406 @jimp
        last edited by Jan 21, 2020, 11:19 PM

        @jimp

        I do not manually specify http:// when I put <firewall>:<port> in the browser. However, if my browser doesn't have that connection cached, then it tries to connect via HTTP. I can't use 443 as that is being redirected to a server in my DMZ, hints the custom port. Example, I can put in pfsense.<localdomain>.com:<port> into a browser that does not have the correct connection cached. As soon as I press enter it automatically puts http:// in front and then I get the 400 bad request. If it is possible, I would like to have it automatically redirect/rewrite the url to replace http:// with https:// so I don't have to manually specify it every time.

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Jan 22, 2020, 1:09 PM

          When using custom ports, no web server can do that. It's not a limitation of pfSense. Your browser is connecting with http to a sever that only speaks https. It can't complete the initial negotiation.

          If you can't remember to put in https, then use bookmarks instead of typing it in.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          S 1 Reply Last reply Jan 22, 2020, 6:40 PM Reply Quote 2
          • S
            SgtKilgore406 @jimp
            last edited by Jan 22, 2020, 6:40 PM

            @jimp

            Okay, thank you for that explanation. I'll leave it as it is and just remind myself to prefix https://.

            1 Reply Last reply Reply Quote 0
            • H
              ha11oga11o
              last edited by Jan 29, 2020, 12:18 PM

              And this just answered my question here:

              https://forum.netgate.com/topic/150042/after-changing-pfsense-from-http-to-https-i-must-type-https-xxxxxx-xx-to-reach-web-page

              Im using custom port, so yeah.

              Thanks for clarification.

              1 Reply Last reply Reply Quote 0
              2 out of 6
              • First post
                2/6
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received