5

I'd like to host a website on Amazon S3. What's the best practice to make a site accessible from both example.com and www.example.com?

1

You should choose one version to use and 301 redirect from one to the other. I don't know if you can use a htaccess file on S3 but if not you may be able to do the redirect from you domain name's control panel.

  • 1
    No, .htaccess can't be used with S3 (that's an Apache specific file). Since S3 can't host naked domains, only subdomains because it uses a CNAME record, you would host www.example.com in the bucket and redirect example.com to the bucket. – Anders Dahnielson Jan 10 '12 at 8:37
0

Amazon offers a free micro server for one year. http://aws.amazon.com/free/ you may be better off setting up a public AMI LAMP stack and have the freedom to configure your website however you'd like.

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.