I am setting up my first website and currently am confused when it comes to properly configuring the subdomains.
I have got a domain from GoDaddy which is, let's say website.com. Then, I am using Firebase for my hosting, database and so on. I managed to register my domain for the Firebase hosting service and that works just fine and I am able to access it properly.
Then I wanted to add two new subdomains which are sub1.website.com and sub2.website.com. First, I went to Firebase console and added those two new subdomains. Then I registered those A (or whatever was the name) entries on my GoDaddy console as requested by Firebase.
After that, I created two subfolders - sub1 and sub2 - in my public directory for my project, added different index.html files in each and deployed hosting to Firebase. Then I was able to access my subdomains at website.com/sub1 and website.com/sub2, but when I went to either sub1.website.com or sub2.website.com, it redirected me to the main page - website.com.
I want to know what I am doing wrong. I searched for answers here on SO and Google, but was not able to find the proper fix just yet. Please help me to resolve this silly issue.
P.S. I am using AngularJS for web development, if that changes anything.