AWS S3 Web Sites and Naked HTTP Redirects

2012-11-14 / All Blog posts

Sites hosted directly off AWS S3 only respond to the www subdomain. In other words, if you tried to navigate to http://mysite.com for a site that was hosted on AWS S3, a 404 status would result, however http://www.mysite.com would work. Some registrars, like Namecheap and GoDaddy have URL Redirect, while others, like GKG.net, do not./p>

Here is how to set up Namecheap to redirect requests like http://mysite.com/blah to http://www.mysite.com/blah so AWS S3 will respond. I also show how to set up the DNS for email with Rackspace.

  1. AWS buckets can only be used for serving web sites if they start with www, for example: www.artforhealingenvironments.
  2. Go to the Namecheap FreeDNS service. This will set up your domain for a smooth transfer to Namecheap, for uninterrupted web presence during and after the transfer.
  3. Enter your domain name, for example artforhealingenvironments.com, and click on Get DNS
  4. On the next page, click on Add DNS Service For the Selected Domains 
  5. Fill in the the Namecheap Hosted Domains page. It will look something like this when you are done, for the artforhealingenvironments.com domain.
    1. In the first IP ADDRESS/URL, put the fully resolved HTTP URL, with a trailing slash; set the record type to URL Redirect: http://www.artforhealingenvironments.com/
    2. In the second IP ADDRESS/URL, put the AWS bucket name, followed by the S3 site's domain; Namecheap will automatically add a period after, so you do not have to. Set the record type to CNAME:www.artforhealingenvironments.com.s3-website-us-east-1.amazonaws.com
    3. Namecheap's minimum TTL is 60 minutes.
    4. Namecheap's web site automatically adds a period after each domain name.
  1. The MX records for email are shown at the bottom; they won't appear until you press the Save Changes button once (not shown). The MAILSERVER HOST NAME values are mx1.emailsrvr.com and mx2.emailsrvr.com.
  2. After the transfer completes, the FreeDNS entry will automatically be removed, and you will manage the domain on the Namecheap Manage Domains page

comments powered by Disqus