Setting up domain with subdomains across (cloud) providers

This is one approach to splitting the DNS of a single domain, across multiple providers. The domain root can exist, in say Cloudflare, and one or more subdomains can exist with AWS Route53. Read on to know why this is even a use case.

Setting up domain with subdomains across (cloud) providers
Image by Olaf from Pixabay

Perhaps you need the free tier of Cloudflare for your static asset heavy photoblog, but the admin panel and microservices need to exists and access resources within the VPC on AWS. How is this possible? Using NS records.

💡
For the uninitiated, NS stands for ‘nameserver,’. Within the DNS ecosystem the nameserver records indicates which DNS server is authoritative for that particular domain (i.e. the server that contains the actual DNS records). Therefore, NS records inform the Internet on where to find out a domain's IP address. Domains often have multiple NS records, this indicates the primary and secondary nameservers for that specific domain. When improperly NS records are configured for a domain, the website or application will simply not load for users.

Let's work with an example. We have our photoblog at fotografia.com, the admin panel for this is at admin.fotografia.com, and static assets at media.fotografia.com