Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 * 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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

The other answer suggests using EC2 t1.micro. According to, 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 (they start under 4$/mo for 128MB, which should be enough for doing a 301 redirect), or (starts at 10$/mo for 512MB in limited locations, Linode is probably more competitive), and run nginx to do the redirection.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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