How to use Google Cloud DNS with a domain name you buy from Papaki.gr and host on Hetzner. This is a common setup and provides a lot of flexibility.
Here’s a breakdown of how it works and what you’ll need to do:
The Roles of Each Component:
- Papaki.gr (Domain Registrar): Papaki.gr is where you register your domain name (e.g., yourdomain.com).1 Their primary role is to manage the ownership of your domain and, crucially, to allow you to specify which DNS servers (nameservers) will handle your domain’s DNS records.
- Google Cloud DNS (DNS Provider): This is where you’ll create and manage all the DNS records for your domain (e.g., A records to point to your server’s IP, CNAME records for subdomains like
www, MX records for email, etc.). Google Cloud DNS offers a robust, globally distributed, and highly available DNS service.2 - Hetzner (Web Host): Hetzner provides the server or hosting environment where your website’s files and database will reside.3 Your website will have an IP address provided by Hetzner.
The Process:
- Register your domain with Papaki.gr: If you haven’t already, purchase your desired domain name from Papaki.gr.
- Set up a Managed Public Zone in Google Cloud DNS:
- Go to the Google Cloud Console and navigate to Cloud DNS.4
- Create a new “Managed Public Zone” for your domain (e.g.,
yourdomain.com).5 - Google Cloud DNS will provide you with a set of nameservers (typically four, like
ns-cloud-e1.googledns.com,ns-cloud-e2.googledns.com, etc.). These are the critical pieces of information you’ll need for the next step.
- Update Nameservers at Papaki.gr:
- Log in to your Papaki.gr account.
- Find the settings for your domain name.
- Look for an option to change or manage “Nameservers” or “DNS Servers.”
- You’ll need to replace Papaki’s default nameservers with the ones provided by Google Cloud DNS in step 2. This tells the entire internet that Google Cloud DNS is now responsible for handling all DNS queries for your domain.
- Create DNS Records in Google Cloud DNS:
- Back in your Google Cloud DNS zone, you’ll add the necessary records to point your domain to your Hetzner hosting.
- A Record: Create an “A” record for your root domain (e.g.,
yourdomain.com) that points to the public IP address of your server at Hetzner. - CNAME Record (for www): It’s common to create a “CNAME” record for
www.yourdomain.comthat points toyourdomain.com. - Other Records (if needed): If you use email services (e.g., Google Workspace, external email provider), you’ll need to add “MX” records.6 You might also need “TXT” records for verification (e.g., for SSL certificates, email authentication like SPF/DKIM).7
- Configure your website on Hetzner: Ensure your website on Hetzner is configured to respond to your domain name. This usually involves setting up the domain in your Hetzner control panel or web server configuration (e.g., Apache virtual host or Nginx server block).
Important Considerations:
- DNS Propagation: After you change your nameservers at Papaki.gr, it can take some time for these changes to propagate across the internet. This “propagation time” can range from a few minutes to up to 48 hours, though it’s often much quicker.
- IP Address from Hetzner: Make sure you have the correct public IP address of your Hetzner server.
- Google Cloud DNS Pricing: Google Cloud DNS is a paid service, but it’s generally very affordable for most use cases, with pricing based on the number of zones and DNS queries.8
By following these steps, you can successfully use Google Cloud DNS to manage your domain’s DNS while keeping your domain registration at Papaki.gr and your hosting at Hetzner.