The mistake here is not understanding the what A and CNAME records support:
Therefore using a full URL path within the CNAME Points to
field is not correct, since a URL is not a domain.
In this instance the correct setting is: subdomain.firebaseapp.com.
DNS points to servers not paths
It is a common mistake by many webmasters that they believe the DNS hosting is responsible for pointing to the content, this is not true.
The DNS is responsible for pointing to the server that hosts the content, nothing more. It is then the responsible of your server to negotiate where your content is located, this is normally done through server side settings, generally referred and known as a virtual host file.
Adding your custom domain within the FireBase Console will add this information to their server-side virtual host file.
Quick Summary of DNS
- Your DNS points to the IP address or cname domain of the server hosting your content.
- Your server translates the domain to where physically your files are stored through the virtual host file.
Redirect are server-side not DNS side
The other issue you have is that you want the domain to point to admin.html
, this can not be set by the domain DNS and will need to be controlled by FireBase. Firebase supports redirects using json, so if you want users to automatically be redirected to admin.html you need to use that method, or another simpler method would be to rename admin.html
to index.html
, therefore no redirect would be required.