---
title: "Discussion on \"How to set up site redirects in CloudFront using Terraform?\" | Hashnode"
description: "Discussion on \"How to set up site redirects in CloudFront using Terraform?\". If you need to set up a redirect for a domain to a subdomain and wonder how to do it in AWS, here is the answer. In my case, I wanted to redirect my apex domain (cntechy.com) to my blog subdomain (blog.cntechy.com). I also wanted https redirect and w..."
url: "https://hashnode.com/posts/how-to-set-up-site-redirects-in-cloudfront-using-terraform/64fb55801fd5a96e0c21632c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to set up site redirects in CloudFront using Terraform?](https://blog.cntechy.com/how-to-set-up-site-redirects-in-cloudfront-using-terraform?utm_source=hashnode&utm_medium=feed)

If you need to set up a redirect for a domain to a subdomain and wonder how to do it in AWS, here is the answer. In my case, I wanted to redirect my apex domain (cntechy.com) to my blog subdomain (blog.cntechy.com). I also wanted https redirect and w...

Sep 8, 2023 · 7 min read · blog.cntechy.com  
Read the article

-   [#terraform](https://hashnode.com/tag/terraform)
-   [#aws](https://hashnode.com/tag/aws)
-   [#cloudfront](https://hashnode.com/tag/cloudfront)

## Written by

[Santhosh Sasidharan](https://hashnode.com/@santhoshss)

@santhoshss · Canada

  
[View profile](https://hashnode.com/@santhoshss)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
