Mike Slinn

AWS S3 websites and Naked HTTP Redirects

Published 2012-11-14.
Time to read: 2 minutes.

This page is part of the posts collection, categorized under AWS.

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

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

  1. Originally AWS buckets could only be used for serving websites if they started with www, for example: www.artforhealingenvironments. This restriction no longer exists.
  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 Namecheap Hosted Domains page. It will look something like this when you are done, for the artforhealingenvironments.com domain.
Namecheap Hosted Domains page
Namecheap Hosted Domains page
    1. In the first IP ADDRESS/URL, put the fully resolved HTTP URL, with a trailing slash; set the record type to URL Redirect: https://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 website 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.

* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.