Search code examples
firebasednsfirebase-hosting

Website reachable by host name but not by ip


The website is reachable by host name but not by the ip adress specified in the A record. The DNS successfully resolves the request to the same ip specified in the A record.

Postman tells me: Error: Hostname/IP does not match certificate's altnames: IP: [...] is not in the cert's list.

Background: I have connected a Firebase application with a existing Domain. Firebase has generated a certificate for this website.


Solution

  • There are not enough IP addresses for all web sites to have a unique IP address. Firebase Hosting makes everyone's sites share the same IP address, and is able to distinguish requests for sites using the HTTP Host header from each request. This means the Host header is required. Postman will add that for you automatically if you use the domain name of your site, but it would have no idea what to use if you just provide an IP address.

    See also: What is http host header?