Table of contents
- 🌟 What You’ll Need
- Step 1: Buy a Domain from GoDaddy (Skip If You Already Have One)
- Step 2: Create an S3 Bucket for Your Website on AWS
- 1️⃣ Open S3
- 2️⃣ Create a New Bucket
- Step 3: Upload Website Files to S3
- Step 4: Enable S3 Static Website Hosting
- Step 5: Allow Public Access to Your Website
- Step 6: Set Up Route 53 for Your Domain
- 🔹 What is Route 53 and Why Do We Need It?
- 🔹 Steps to Set Up Route 53 for Your Domain
- 1️⃣ Open Route 53 in AWS
- 2️⃣ Create a Hosted Zone
- 3️⃣ Enter Your Domain Name
- 4️⃣ Get Your AWS Name Servers
- Step 7: Connect Your GoDaddy Domain to AWS Route 53 (Beginner-Friendly Guide)
- 🔹 What Are Name Servers? (Simple Explanation)
- 🔹 Steps to Change Name Servers in GoDaddy
- 1️⃣ Log in to Your GoDaddy Account
- 2️⃣ Open Your Domain Settings
- 3️⃣ Find the Nameservers Section
- 4️⃣ Change the Nameservers
- 5️⃣ Select "Enter My Own Nameservers"
- 6️⃣ Copy-Paste AWS Name Servers from Route 53
- 7️⃣ Save the Changes
- 8️⃣ Wait for the Changes to Take Effect
- Step 8: Create an A Record in Route 53 (Connecting Your Domain to S3 Website)
- 🔹 Steps to Create an A Record in Route 53
- 1️⃣ Open Route 53 in AWS
- 2️⃣ Create a New A Record
- 3️⃣ Configure the A Record
- 👀 What You’ll See on the Screen & What to Enter
- 4️⃣ Save the A Record
- Step 9: Test Your Website (Does It Work?)
- 1️⃣ Open Your Website in a Browser
- 2️⃣ What Should Happen?
- 🔹 What If My Website Doesn't Work?
- Conclusion
So, you have a domain (like mycoolwebsite.com
), and you want to connect it to a website hosted on AWS? Sounds complicated? Don't worry! 😃
In this guide, I will explain everything step by step in a way that even a complete beginner can follow.
We'll do three things:
Buy a domain from GoDaddy (if you don’t have one).
Host a static website on AWS S3 (Static means no database, just HTML, CSS, and JavaScript).
Connect your domain to AWS using Route 53 (so your site loads when people type your domain name).
💡 Think of Route 53 as a "phonebook" that tells browsers where to find your website files stored in S3.
🌟 What You’ll Need
✔ A GoDaddy account (to manage your domain).
✔ An AWS account (for hosting your website).
✔ Some basic website files (index.html
, style.css
, etc.).
If you don’t have a website yet, don’t worry! I will give you a simple HTML file later. 😃
Step 1: Buy a Domain from GoDaddy (Skip If You Already Have One)
1️⃣ Go to GoDaddy.com.
2️⃣ Type the domain name you want in the search bar (e.g., mycoolwebsite.com
).
3️⃣ If the domain is available, click Add to Cart.
4️⃣ Click Continue to Cart and follow the checkout process.
💡 Tip: You don’t need extras like “Privacy Protection” unless you want them.
Step 2: Create an S3 Bucket for Your Website on AWS
1️⃣ Open S3
Go to AWS Console → Click on Services (top-left).
Search for S3 and click on it.
2️⃣ Create a New Bucket
Click “Create bucket” (big orange button).
Bucket name → Enter your domain name (e.g.,
mycoolwebsite.com
).AWS Region → Choose the closest region to your visitors.
💡 Important: Your bucket name must be the same as your domain name (mycoolwebsite.com
).
Scroll down to the "Block Public Access settings" section:
Uncheck “Block all public access” (We want the public to see our website).
A warning will appear—just check the box “I acknowledge that…”
Click “Create bucket”.
Step 3: Upload Website Files to S3
Open your new S3 bucket.
Click “Upload” (top-right).
Drag and drop your HTML, CSS, and JS files (or click “Add files” to select them).
Click Upload.
💡 If you don’t have a website yet, create a simple index.html
file with this content:
<!DOCTYPE html>
<html>
<head>
<title>My Cool Website</title>
</head>
<body>
<h1>Welcome to My Cool Website!</h1>
</body>
</html>
Step 4: Enable S3 Static Website Hosting
Open your S3 bucket.
Click the "Properties" tab.
Scroll down to "Static website hosting".
Click "Edit" → Select "Enable".
Set:
Index document →
index.html
Error document →
error.html
(optional)
Click Save changes.
Copy the "Bucket website endpoint" (It looks like
http://mycoolwebsite.s3-website-us-east-1.amazonaws.com
).
Step 5: Allow Public Access to Your Website
By default, S3 blocks access to your files. Let's fix that:
Go to your S3 bucket → Click "Permissions".
Scroll to "Bucket policy" → Click "Edit".
Paste this policy (replace
mycoolwebsite.com
with your actual bucket name):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mycoolwebsite.com/*"
}
]
}
- Click Save changes.
Now, when you open the Bucket Website Endpoint, your site should be visible! 🎉
Step 6: Set Up Route 53 for Your Domain
Now that we have our website hosted on S3 and our domain registered in GoDaddy, we need to set up Route 53 to manage our domain’s DNS.
🔹 What is Route 53 and Why Do We Need It?
Route 53 is AWS’s Domain Name System (DNS) service.
It helps connect your domain name (e.g.,
mycoolwebsite.com
) to the actual website files stored in S3.Right now, GoDaddy manages your domain’s DNS. We need to transfer DNS management to Route 53 so we can properly connect it to AWS.
🔹 Steps to Set Up Route 53 for Your Domain
1️⃣ Open Route 53 in AWS
Open a web browser and go to AWS Console.
Sign in to your AWS account.
In the AWS search bar, type Route 53 and click on it.
2️⃣ Create a Hosted Zone
3️⃣ Enter Your Domain Name
In the "Domain name" field, enter your domain name exactly as it appears in GoDaddy.
- Example:
mycoolwebsite.com
(nowww.
).
- Example:
Under "Type", select "Public Hosted Zone" (because this is a public website).
Click "Create hosted zone".
4️⃣ Get Your AWS Name Servers
After creating the hosted zone, AWS will automatically generate four Name Server (NS) records. These look like this:
ns-1234.awsdns-56.com
ns-5678.awsdns-78.net
ns-9101.awsdns-90.org
ns-1213.awsdns-12.co.uk
📌 Copy all four name servers – we will use them in GoDaddy in the next step.
Step 7: Connect Your GoDaddy Domain to AWS Route 53 (Beginner-Friendly Guide)
Now that we have created a Hosted Zone in Route 53 and got our Name Servers, it's time to connect your GoDaddy domain to AWS.
This step is important because it tells the internet that your domain name should point to AWS, where your website is hosted.
Let’s break it down slowly and in detail so even a complete beginner can follow! 🚀
🔹 What Are Name Servers? (Simple Explanation)
Right now, your domain is registered with GoDaddy, but GoDaddy doesn’t know where your website is stored.
Name Servers are like the GPS coordinates of your website. They tell GoDaddy, “Hey, this website is actually hosted on AWS!”
We will replace GoDaddy’s default name servers with AWS name servers from Route 53.
🔹 Steps to Change Name Servers in GoDaddy
1️⃣ Log in to Your GoDaddy Account
Open a browser (Chrome, Safari, Edge, etc.).
Click Sign In (top right corner).
Enter your GoDaddy email/username and password → Click Sign In.
2️⃣ Open Your Domain Settings
After logging in, you’ll see your GoDaddy Dashboard.
Click "My Products" (top menu).
Scroll down to the Domains section.
Find the domain name you want to use (e.g.,
mycoolwebsite.com
).Click the "Manage" button next to your domain.
3️⃣ Find the Nameservers Section
After clicking "Manage," you will see your domain’s settings page.
Scroll down until you find the "Nameservers" section.
Here, you will see something like this:
ns01.domaincontrol.com ns02.domaincontrol.com
These are GoDaddy’s default name servers. We need to replace them with AWS name servers.
4️⃣ Change the Nameservers
In the Nameservers section, click the "Change" button.
A new window will pop up asking how you want to change your name servers.
5️⃣ Select "Enter My Own Nameservers"
In the pop-up window, select "Enter my own nameservers (advanced)".
Now, GoDaddy will allow you to enter your own custom name servers (which we got from Route 53).
6️⃣ Copy-Paste AWS Name Servers from Route 53
Open a new tab in your browser and go to the AWS Console.
Click on Services → Search for Route 53 and open it.
Click on "Hosted Zones".
Click on your domain name (
mycoolwebsite.com
).Look for the NS (Name Server) record – you will see four name servers like this:
ns-1234.awsdns-56.com ns-5678.awsdns-78.net ns-9101.awsdns-90.org ns-1213.awsdns-12.co.uk
Copy all four name servers one by one and paste them into GoDaddy.
Go back to GoDaddy’s Nameserver settings.
You will see four empty boxes where you can enter the name servers.
Paste each name server into a separate box.
✅ Example (in GoDaddy):
ns-1234.awsdns-56.com
ns-5678.awsdns-78.net
ns-9101.awsdns-90.org
ns-1213.awsdns-12.co.uk
7️⃣ Save the Changes
After pasting the four name servers, double-check to make sure they are correct.
Click "Save" or "Confirm".
GoDaddy may ask for confirmation – if so, click Yes or Confirm.
8️⃣ Wait for the Changes to Take Effect
DNS changes don’t happen instantly.
It can take anywhere from 30 minutes to 48 hours for the internet to update the new name servers.
In most cases, it happens within a few hours.
Step 8: Create an A Record in Route 53 (Connecting Your Domain to S3 Website)
Now that we have set up our domain in GoDaddy and pointed it to AWS Route 53, we need to create an A Record in Route 53.
What is an A Record? 🤔
An A Record (Address Record) tells the internet where to find your website when someone types your domain (mycoolwebsite.com
).
Since we are hosting our website on Amazon S3, we need to connect our domain to our S3 bucket’s website endpoint using an A Record with Alias.
🔹 Steps to Create an A Record in Route 53
1️⃣ Open Route 53 in AWS
Open a web browser and go to AWS Console.
Sign in to your AWS account.
In the AWS search bar, type Route 53 and click on it.
On the left menu, click "Hosted Zones".
Find and click on your domain name (
mycoolwebsite.com
).
2️⃣ Create a New A Record
Inside your Hosted Zone, click "Create Record" (big orange button).
You will now see a form to enter record details.
3️⃣ Configure the A Record
👀 What You’ll See on the Screen & What to Enter
Field Name | What to Do |
Record Name | Leave it blank (for the root domain like mycoolwebsite.com ). |
Record Type | Select A - IPv4 address. |
Alias | Select "Yes". |
Alias Target | Click inside the box and choose your S3 Bucket Website Endpoint from the list. |
Routing Policy | Leave it as Simple routing (default). |
Evaluate Target Health | Leave it unchecked. |
4️⃣ Save the A Record
Double-check that your Alias Target is pointing to your S3 bucket.
Click "Create Record" (big orange button at the bottom).
Your A Record is now created! 🎉
Step 9: Test Your Website (Does It Work?)
After setting up everything, it’s time to check if your website is live and working.
1️⃣ Open Your Website in a Browser
Open Google Chrome, Safari, Edge, or Firefox.
In the address bar, type your domain name (
mycoolwebsite.com
).Press Enter.
2️⃣ What Should Happen?
✅ If everything is set up correctly → Your website will load! 🎉
❌ If it doesn’t load → Don’t panic! Sometimes DNS changes take time.
🔹 What If My Website Doesn't Work?
Here are some common reasons & fixes:
1️⃣ DNS is still updating
Wait for 30 minutes to a few hours (DNS propagation can take time).
Check your domain’s DNS records using https://who.is/ to see if the Name Servers are updated.
2️⃣ S3 Bucket is Not Public
Go to S3 → Open your bucket → Check if your files are public.
If needed, follow Step 5 to update the Bucket Policy.
3️⃣ Wrong A Record Configuration in Route 53
Go back to Route 53 Hosted Zone and make sure:
The A Record exists.
The Alias Target is correctly pointing to your S3 Website Endpoint.
Conclusion
Congratulations! You just: ✅ Bought a domain (GoDaddy)
✅ Hosted a static website (AWS S3)
✅ Connected your domain (Route 53)
Now, your website is live on the internet! 🚀
👉 Next Steps?
Add HTTPS (SSL) using AWS CloudFront.
Improve site speed with a CDN.
Want help with SSL? Let me know! 😊