Wednesday, May 9, 2018

How to configure DNS to point main domain at Firebase hosting, but not subdomain



I currently have a website hosting on CPanel which consists of subdomain.example.com and example.com. I'd like to keep the subdomain hosted where it is, but move the main domain to be hosted with Firebase. I'm struggling to work out the required DNS changes to make this work.



If it is relevant, the domain was purchased from 123-reg and points to custom nameservers on my CPanel server.




I read this answer, but I've also read that Firebase no longer allows CNAME records and has to be A records.



Would it work to have an A record pointing to the IP addresses supplied by Firebase and a CNAME record for the subdomain pointing to the server where it is currently hosted?


Answer



You need to create two A records:




  • domain.com -> Public IP address of your first server

  • sub.domain.com - Public IP address of your second server



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...