I was playing around aws route53. I understand that a private hosted zone will help resolve the domain name in vpc. For example i can create a google.com private hosted zone to resolve google.com to my custom ip in my vpc.
NOW, i was expecting that route53 should not allow me to create google.com public hosted zone as i dont own the domain. BUT it allowed me to create it
So now i am confused, What does the public hosted zone means ? How does it work? Why it allowed me to create such a hosted zone? What mental model am i missing?
As far as I understand when someone enters a URL in the browser, the request goes to the root name server which uses a delegation chain to resolve the authoritative namespace server .. since your custom google.com entry is not present in the authoritative namespace server, people on the internet are not resolving to it...
But the fun thing to do is if you do
nslookup google.com yournamespaceserver
then google.com should resolve to your custom hosted zone IP.