0

I launch a web application by sudo PORT=443 HTTPS=true ./node_modules/.bin/react-scripts start.

Then, I run https://localhost:443/#/start in a browser. It does open the start page, but the url becomes https://localhost/#/start.

Could anyone tell me why https://localhost:443/#/start becomes https://localhost/#/start?

PS: The browser is Chrome.

2
  • 5
    Because port 443 means https, and that is already in the URL.
    – Gantendo
    Commented Nov 9, 2021 at 21:15
  • 6
    The default https port is 443 so the port is assume to be 443 and isn't necessary. The port is only required if you are hosting the website on a different port (but typically the web application will handle the redirect) or multiple websites on the same server (but again the web application would handle the redirection).
    – Ramhound
    Commented Nov 9, 2021 at 21:16

1 Answer 1

1

HTTP default hidden port is 80, while HTTPs is 443.

Example:

http://localhost | http://localhost:80

https://localhost | https://localhost:443

443 is the default port for HTTPs websites.

For example,
https://superuser.com

Is the same as
https://superuser.com:443

and

http://superuser.com

Is the same as
http://superuser.com:80

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .