0

I have deployed a web app with firebase hosting. I get a URL, when I point my browser to that URL everything works fine.

enter image description here

I pinged the url to get the corresponding IP address say "xx.xx.xx.xx". enter image description here Now when I update my /etc/hosts file:

enter image description here

then point my browser to https://myapp, I get a 404. enter image description here What am I doing wrong ?

zion inc
  • 145
  • 1
  • 1
  • 9

1 Answers1

1

HTTPS urls can't have their hostname changed. The SSL certificate that was provisioned for your site was tied to your given host, or any of the custom domains that are associated with your site. You can't simply use /etc/hosts to direct secure traffic from an arbitrary host name to an arbitrary IP address, because that would potentially expose security issues for your site.

Also see this question.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441