How to forward http request to https in Amazon Route53?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Amazon Route 53 cannot redirect HTTP to HTTPS by itself because Route 53 is a DNS service, not a web server or proxy. DNS answers questions like "which IP or AWS resource handles this hostname," but it never sees the HTTP request path or sends HTTP status codes such as 301 or 302. To redirect HTTP to HTTPS, you need Route 53 plus an HTTP-capable service such as CloudFront, an Application Load Balancer, S3 website hosting, or your own web server.
Why Route 53 Alone Cannot Do It
A browser reaches Route 53 only for name resolution. After DNS resolution, the browser sends the actual HTTP request to the returned endpoint.
That means Route 53 can:
- resolve
example.comto a target - alias a record to CloudFront or a load balancer
- route traffic at the DNS level
But it cannot:
- inspect
http://versushttps://requests - return HTTP redirect responses
- rewrite URLs
So the correct mental model is: Route 53 points traffic somewhere, and that somewhere performs the redirect.
Common AWS Patterns That Work
1. CloudFront
CloudFront can redirect viewers from HTTP to HTTPS using its viewer protocol policy. Route 53 then points the domain to the CloudFront distribution.
2. Application Load Balancer
An ALB can listen on port 80 and return a redirect action to 443.
3. S3 Static Website Redirect
For simple hostname redirects, an S3 static website endpoint can redirect requests to another HTTPS URL. This works for straightforward website redirection but is not a universal replacement for a full HTTPS-serving frontend.
Example: ALB Redirect
A clear HTTP-to-HTTPS setup is an ALB with two listeners.
- port
80listener: redirect to HTTPS - port
443listener: serve the application
In infrastructure-as-code, the redirect listener looks conceptually like this:
Route 53 then creates an alias record to that ALB.
Example: CloudFront Viewer Redirect
With CloudFront, the key setting is the behavior's viewer protocol policy.
Route 53 points the hostname to the CloudFront distribution using an alias record. CloudFront becomes the HTTP-facing service that issues the redirect.
This is often a good choice when you are already serving the site through CloudFront and ACM.
Example: Simple Domain Redirect With S3 Website Hosting
For a straightforward redirect from one hostname to another, an S3 website bucket can be configured to redirect all requests.
That looks like:
- create a bucket named after the redirecting hostname
- enable static website hosting
- configure "redirect requests" to the target HTTPS hostname
- point Route 53 to the S3 website endpoint or a CloudFront distribution in front of it, depending on the architecture
This is simple, but it is best for basic site redirection rather than a general application ingress strategy.
Common Pitfalls
- Expecting Route 53 to send an HTTP
301or302response directly. - Confusing DNS routing with web-server behavior.
- Pointing the domain correctly in Route 53 but never configuring the redirect at the HTTP layer.
- Using an S3 redirect pattern when the application actually needs a full HTTPS frontend.
- Forgetting that the redirecting service, not Route 53, must handle ports
80and443correctly.
Summary
- Route 53 cannot perform HTTP-to-HTTPS redirects on its own.
- Use Route 53 to route the hostname to a service that can return an HTTP redirect.
- CloudFront, an ALB, S3 website hosting, or your own web server are the usual solutions.
- Route 53 handles DNS; the redirect must happen at the HTTP layer.
- Choose the redirecting service based on whether you need a simple hostname redirect or a full application frontend.
Related reading
- How to forward port in AWS Application load balancer ALB port forwarding
- How to generate OpenAPI 3.0 YAML file from existing Spring REST API?
- How to generate password_hash for RabbitMQ Management HTTP API
- How to generate Swagger UI from javadocs?
- How to generate a verification code/number?
- How to generate access token for an AWS Cognito user?
- How to get a custom healthcheck path in a GCE L7 balancer serving a Kubernetes Ingress?
- How to get a Docker container's IP address from the host

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.