What is the simplest way to set up a 307 from one apex domain to another on AWS Route53?

  • thecontent.com - the content
  • www.thecontent.com - should 307 to thecontent.com
  • otherdomain.net - should 307 to thecontent.com

Here's what I've tried:

  1. Create hosted zone for thecontent.com
  2. Create AWS bucket with the content and cloudfront distribution.
  3. Setup an apex record: A ALIAS d1waasdf05wj5.cloudfront.net.
    • So far, visiting all these URLs works
  4. Create a public bucket www.content.com with "Static website hosting".
    • For 301, "Redirect Requests"
    • For 307, "Use this bucket to host a website"
    • Set "Redirection rules"

Redirection rules


So far, this works. wget --max-redirect 0 http://bucket-endpoint-url shows a 307

  1. Setup www.thecontent.com -> thecontent.com

    • I can setup a CNAME easy to forward www->apex, but that won't work for apex->apex. An apex can't have a CNAME.
    • So, I read to setup an A record with an ALIAS to the bucket, but the bucket doesn't show up in the alias dropdown...

I get "Alias Target contains an invalid value." from these values:

Name: www, Type: A, Alias: Yes, Alias Target:

This A record for the www subdomain would be the same as I'd use on the other domain, right? What am I missing?

1 Answer 1


Lol, I got a Tumbleweed badge for this question.

My solution was to not use Route53 for all these redirects - AWS is almost guaranteed to be 200+% the cost of other cloud solutions.

Instead, I used https://www.cloudns.net/ for DNS on these smaller less important redirect domains.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .