How to Point Your GoDaddy Apex (Root) Domain to a CloudFront Application - A Simple Workaround! 💡
Learn How to forward Your Root Domain to www with GoDaddy and CloudFront

Search for a command to run...
Learn How to forward Your Root Domain to www with GoDaddy and CloudFront

No comments yet. Be the first to comment.
This blog series is all about hands-on AWS. No theory, no jargon - just practical tasks you can apply immediately. Whether you're deploying, automating, or troubleshooting, these step-by-step guides help you get things done in AWS, the right way. 🚀
Migrating EC2 Instances? Here’s Everything You Need to Know!
If you have been working with Kubernetes for a while, there's a good chance you've used NGINX Ingress to expose services outside your cluster. For years, it has been the default choice for many teams

Hey everyone! 👋 When I’m working with an S3 + CloudFront setup, I noticed something that made me curious there are two different ways to let CloudFront access S3: OAI (Origin Access Identity) and the newer OAC (Origin Access Control). That got me wo...

AWS cross account access with OIDC provider in EKS With ExternalDNS

Managing AWS EC2 instances without worrying about SSH keys is a big relief, and AWS Systems Manager (SSM) Session Manager makes it even easier. It provides a secure way to connect to your instances. In this guide, I will walk you through the steps to...

Migrating an Amazon RDS (Relational Database Service) instance from one AWS account to another is a bit different from migrating an EC2 instance. Unlike EC2, RDS is a managed service, and you can't directly "Create AMI and give permission to destinat...

Have you ever faced the issue where your application works perfectly with www.example.com but fails to load when you try example.com? If you’re using GoDaddy and CloudFront, you might have encountered this problem. By default, GoDaddy doesn’t allow you to point a CNAME record to an APEX (root) domain like example.com. But don’t worry – there’s a workaround! In this blog, I’ll Walk you through the steps I took to solve this issue and get my application up and running for both www.example.com and example.com.
When I deployed my application using AWS CloudFront, I could only point my domain to www.example.com. Whenever I tried to access example.com (the root domain), I got Error from GoDaddy. This is because GoDaddy doesn’t support CNAME records for APEX (root) domains by default. CNAME records are typically used for subdomains like www, but not for the root domain.

After some research and trial and error, I found a simple workaround using GoDaddy’s forwarding feature. Here’s how I did it:
Log in to Your GoDaddy Account: Go to your GoDaddy dashboard and navigate to the domain you want to configure.
Set Up a Forward:
Go to the Forwarding section.

Select the root domain (example.com) and set it to forward to www.example.com.
Choose the Permanent (301) forward option.
Then click > Save.

Save the Changes: Once you’ve configured the forward, save the changes. It might take a few minutes for the changes to propagate.
By setting up a forward, you’re essentially telling GoDaddy to forward all traffic from example.com to www.example.com. Since www.example.com is a subdomain, you can easily point it to your CloudFront distribution using a CNAME record. This way, users accessing example.com will be seamlessly forwarded to www.example.com, where your application is hosted.
www.example.com to CloudFront: 🧱🔨Go to DNS Management: In your GoDaddy account, navigate to the DNS management section for your domain.
Add a CNAME Record:
Create a new CNAME record for www.
Point it to your CloudFront distribution’s domain name (e.g., d1234.cloudfront.net).

Save the Changes: Save the DNS changes and wait for them to propagate (this can take up to 48 hours, but it’s usually faster).
While GoDaddy doesn’t allow CNAME records for APEX (root) domains, this simple forward workaround ensures that your users can access your application using both example.com and www.example.com. By following these steps, I was able to solve the issue and make my application accessible from both URLs.
I hope this guide helps you too! ❤️
📌If you’re looking for a more advanced solution, consider using AWS Route 53 for DNS management. Route 53 supports ALIAS records, which allow you to point your root domain directly to CloudFront without the need of forwarding option.
📌Alternatively, if you don’t want to use AWS, you can use Cloudflare. Cloudflare allows you to create CNAME-like records for root domains (using their CNAME flattening feature), making it easy to point example.com directly to your CloudFront endpoint. Plus, Cloudflare offers additional benefits like improved performance, security, and DDoS protection.
📬Let me know in the comments if this solution worked for you! and 🔗share this guide with others who might find it helpful!
#cloudfront #aws #getintokube #getintokubeblogs