<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Adeel Niaz Tech Blog]]></title><description><![CDATA[Explore practical tutorials on Full Stack Development, React, Next.js, AWS Cloud, and Technical SEO by Adeel Niaz. Build faster, SEO-friendly websites.]]></description><link>https://adeelniaz.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 25 Oct 2026 01:48:58 GMT</lastBuildDate><atom:link href="https://adeelniaz.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Deploy a Static Website on AWS S3 and CloudFront — Step-by-Step Guide]]></title><description><![CDATA[Learn to deploy a static website using AWS S3, CloudFront, ACM, and Route 53 with this practical step-by-step hosting guide.]]></description><link>https://adeelniaz.hashnode.dev/how-to-deploy-a-static-website-on-aws-s3-and-cloudfront-step-by-step-guide</link><guid isPermaLink="true">https://adeelniaz.hashnode.dev/how-to-deploy-a-static-website-on-aws-s3-and-cloudfront-step-by-step-guide</guid><category><![CDATA[AWS]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Adeel Niaz]]></dc:creator><pubDate>Wed, 14 Oct 2026 10:14:40 GMT</pubDate><content:encoded><![CDATA[<h2>Introduction</h2>
<p>Deploying a static website on AWS is a great way to learn cloud hosting and deliver fast, secure websites.</p>
<p>In this guide, I'll explain how to deploy a static HTML, CSS, and JavaScript website using <strong>Amazon S3, Amazon CloudFront, AWS Certificate Manager (ACM), and Amazon Route 53</strong>.</p>
<p>These are the services I used when deploying my own portfolio website, <a href="https://adeelniaz.com/">adeelniaz.com</a>.</p>
<h2>1. Create an Amazon S3 Bucket</h2>
<p>Amazon S3 provides object storage for your website files.</p>
<ol>
<li><p>Sign in to the AWS Management Console.</p>
</li>
<li><p>Open the Amazon S3 service.</p>
</li>
<li><p>Create a new bucket with a unique name.</p>
</li>
<li><p>Select your preferred AWS Region.</p>
</li>
<li><p>Keep Block Public Access enabled when using CloudFront Origin Access Control (OAC).</p>
</li>
<li><p>Upload your HTML, CSS, JavaScript, and image files.</p>
</li>
</ol>
<p><strong>Tip:</strong> For a secure setup, keep your S3 bucket private and allow access through CloudFront OAC.</p>
<h2>2. Configure Amazon CloudFront</h2>
<p>Amazon CloudFront is a Content Delivery Network (CDN) that delivers website content through globally distributed edge locations.</p>
<p>To configure CloudFront:</p>
<ol>
<li><p>Open the CloudFront console.</p>
</li>
<li><p>Create a new distribution.</p>
</li>
<li><p>Select your S3 bucket as the origin.</p>
</li>
<li><p>Configure Origin Access Control (OAC).</p>
</li>
<li><p>Apply the required S3 bucket policy.</p>
</li>
<li><p>Set <code>index.html</code> as the default root object.</p>
</li>
<li><p>Create the distribution and wait for deployment.</p>
</li>
</ol>
<p>CloudFront provides a distribution domain that you can use to test your website.</p>
<h2>3. Set Up HTTPS with AWS Certificate Manager</h2>
<p>HTTPS encrypts communication between visitors and your website.</p>
<p>To configure HTTPS:</p>
<ol>
<li><p>Open AWS Certificate Manager (ACM) in the <strong>US East (N. Virginia)</strong> Region (<code>us-east-1</code>).</p>
</li>
<li><p>Request a public SSL/TLS certificate for your domain.</p>
</li>
<li><p>Complete domain validation using DNS.</p>
</li>
<li><p>Attach the validated certificate to your CloudFront distribution.</p>
</li>
<li><p>Add your custom domain as an alternate domain name in CloudFront.</p>
</li>
</ol>
<p><strong>Important:</strong> CloudFront requires ACM certificates to be in the <code>us-east-1</code> Region.</p>
<h2>4. Connect Your Domain with Route 53</h2>
<p>Amazon Route 53 is a DNS service that can route your domain traffic to CloudFront.</p>
<ol>
<li><p>Open Route 53.</p>
</li>
<li><p>Select the hosted zone for your domain.</p>
</li>
<li><p>Create an A record using the Alias option.</p>
</li>
<li><p>Choose your CloudFront distribution as the target.</p>
</li>
<li><p>Save the DNS record.</p>
</li>
</ol>
<p>If you use another DNS provider, follow its supported configuration for pointing your domain to CloudFront.</p>
<h2>5. Test Your Website</h2>
<p>After configuration:</p>
<ul>
<li><p>Open your website using its HTTPS domain.</p>
</li>
<li><p>Check that images, CSS, and JavaScript load correctly.</p>
</li>
<li><p>Test mobile responsiveness.</p>
</li>
<li><p>Verify internal navigation links.</p>
</li>
<li><p>Test website performance using Google PageSpeed Insights.</p>
</li>
</ul>
<p>If you update website files, CloudFront caching may delay changes. You can create a cache invalidation when necessary.</p>
<h2>6. Optimize Performance and SEO</h2>
<p>Deployment is only the beginning. A professional website also needs technical SEO and performance optimization.</p>
<p>Some important improvements include:</p>
<ul>
<li><p>Unique page titles and meta descriptions.</p>
</li>
<li><p>Proper heading structure.</p>
</li>
<li><p>Descriptive image alt text.</p>
</li>
<li><p>XML sitemap and robots.txt.</p>
</li>
<li><p>Canonical URLs.</p>
</li>
<li><p>Mobile-friendly layouts.</p>
</li>
<li><p>Compressed images and optimized assets.</p>
</li>
</ul>
<p>You can also connect Google Search Console to monitor indexing and organic search performance.</p>
<h2>7. Understand AWS Costs</h2>
<p>AWS services are not always free.</p>
<p>S3 storage, CloudFront traffic, Route 53 hosted zones, domain registration, and other services may incur charges depending on your usage and account eligibility.</p>
<p>Use AWS Budgets and billing alerts to monitor your spending.</p>
<h2>Final Thoughts</h2>
<p>Amazon S3 and CloudFront provide a scalable approach to hosting static websites.</p>
<p>By combining S3, CloudFront, ACM, and DNS configuration, you can build a secure and high-performance hosting setup.</p>
<p>For a more detailed walkthrough, read my original guide:</p>
<p><a href="https://adeelniaz.com/blog/deploy-static-website-aws-s3-cloudfront.html"><strong>How to Deploy a Static Website on AWS S3 and CloudFront</strong></a></p>
<p>You can also explore my <a href="https://adeelniaz.com/services/aws-cloud.html">AWS Cloud services</a> and other projects on my portfolio.</p>
<hr />
<p><em>Written by Adeel Niaz — Full Stack Developer, AWS Cloud Engineer &amp; SEO Specialist.</em></p>
]]></content:encoded></item></channel></rss>