How to Point Your GoDaddy Apex (Root) Domain to a CloudFront Application - A Simple Workaround! đĄ


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
.
My Scenario: đľâđŤ
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.
The Solution: Using GoDaddyâs Forwarding OptionđĄ
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 towww.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.
Why This Works: âď¸â
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.
Steps to Point 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).
Conclusion: đ
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! â¤ď¸
Pro Tip: đ
đ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
Subscribe to my newsletter
Read articles from Gerlyn M directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Gerlyn M
Gerlyn M
Gerlyn is a DevOps engineer with a strong passion for Kubernetes and automation. He is always eager to learn and continuously strives to enhance his skills, aiming to become an expert in the field. He loves to share his knowledge with the community.