My domain name hosted on Route 53 DNS.

Amazon has a guide to do 301 redirection for www. To naked domain by point www. version to a S3 static website with 301 setted up.

My question is, how can I have *.domain.com all have 301 redirec to naked domain name.

I guess either:

Some way to get all wildcard subdomains end up into one S3 bucket, how?


Use CloudFront on the www. version S3 site and put wildcard subdomains on the CloudFront, but how?


There's some hidden settings just lies on Router 53, then where?

Or: use EC2, better not suggest me this, too costing for this task.

Please advice.


There isn't a way to do this in Route53/CloudFront without getting a server involved. Like it or not, your best option is an EC2 t1.micro instance that handles these redirects.


The other answer suggests using EC2 t1.micro. According to http://aws.amazon.com/pricing/elasticbeanstalk/, with Linux, that'll run you at the very least 14,30$/mo, for only 613 MiB RAM and with a very low CPU (and at most 2 CPUs), plus extra for all other resources. Way too expensive, if you ask me!

For comparison, you can get a Linode for 20$/mo, with 1024MB RAM and lots of other resources already included. Linode also has 5 unicast DNS servers (4 in the US, one in London), which every customer can use free of any extra charges, and without any limits imposed.

Or, should you wish to stay with Amazon Route 53, you could perhaps rent a cheap box from edis.at (they start under 4$/mo for 128MB, which should be enough for doing a 301 redirect), or vr.org (starts at 10$/mo for 512MB in limited locations, Linode is probably more competitive), and run nginx to do the redirection.

  • If you commit to a 1 or 3 year reserved instance, micro instances drop to about $5-7/month. Also, the first year is entirely free - new AWS users get a year of one server's t1.micro worth of usage. – ceejayoz May 2 '13 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.