46

I have:

  1. signed up for an AWS account
  2. set up buckets for example.com and www.example.com
  3. enabled website settings in properties for each domain
  4. set bucket policies for both domains
  5. created this cname record:
    www > www.example.com.s3-website-us-east-1.amazonaws.com

Right now when a user goes to www.example.com, they see the index page, and everything is working just fine. When they go to example.com, there is nothing but darknenss and silence because the page just doesn't load (and gives 'connection timeout' error. )

What I want is for example.com to forward to www.example.com so that no matter what the user types in the browser, they see the site that is located at www.example.com.

  • How do I make this work?
  • Can I add a record of some kind at godaddy to make example.com redirect to www.example.com?
  • Do I have to get a static IP to make this work using s3? I keep reading about an elastic IP from EC2, but I am not understanding how I can set that up, or how it would work since I am not using EC2 at all for my website.
Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
empathysage
  • 565
  • 1
  • 4
  • 9

9 Answers9

68

I think user Go Daddy's answer was correct, but I'll write up more succinct instructions that I followed to get the forwarding to work for me. I don't know why others are suggesting wwwizer, because GoDaddy uses a 301-redirect too (but maybe it didn't used to?). By the way, this answer isn't specific to Amazon's S3 -- it simply requires you have the "www" CNAME record set correctly.

  1. Login to GoDaddy.com.
  2. Click on My Account.
  3. Click on the Domains product, and click the Launch button next to your domain.
  4. In the Domain Information section you should see "Forwarding: Off". Click the Manage link next to it.
  5. A Forwarding and Masking dialog box should come up. Under Forward example.COM to enter www.example.com.
  6. Click the OK button.

The forwarding kicked in for me within maybe half an hour.

To note, in the dialog box you can change it to forward either "http://" or "https://". I only needed it for "http://", so I'm not sure if GoDaddy will forward both SLL and non-SSL at the same time.

Also, if you're curious, if you click on the Advanced Options link in the Forwarding and Masking dialog box, it should be defaulted to "Forward Only" and have the redirect type set to permanently forward your domain (which is what gives the 301-redirect).

Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109
Michael Krebs
  • 7,951
  • 1
  • 21
  • 17
14

You can use wwwizer's free naked domain redirect service:

http://wwwizer.com/naked-domain-redirect

Just put 174.129.25.170 as the A record for the non-www version of your domain.

rjmunro
  • 27,203
  • 20
  • 110
  • 132
3

fragholrok,

I'm glad you were able to find a way to get your site working. Admittedly, it's a little hard to understand exactly what's going on with your domain name without more specific info, but I wanted to jump in and mention one thing.

You weren't sure if you could forward your domain to the www subdomain. It depends how you have it setup - sometimes it will work and sometimes it won't. According to your original post, the www subdomain is setup with its own CNAME (as opposed to mirroring the main A Record). Because of this, you COULD forward your domain to the www subdomain - ie, forward domain.com to www.domain.com - using GoDaddy.com's domain forwarding functionality.

If, however, the CNAME for a subdomain is set to '@', which means it directs to the main A Record, forwarding the domain to the subdomain would not work.

I just wanted to clarify for anyone else who might come across this thread.

Good luck with your site,

Alon GoDaddy.com Social Media

Go Daddy
  • 39
  • 3
  • Oh! I was a bit confused by the cname/a record thing so thanks for clarifying! I'm sure I'm not the only one confused about it, so I agree that this info will be useful to others as well. – empathysage May 04 '11 at 18:36
1

If you are using Route 53, you can create a new bucket with your naked domain name, and under 'Static Website Hosting', set it to 'Redirect all requests to another host name'.

Oleg Vaskevich
  • 12,444
  • 6
  • 63
  • 80
1

Update : Jul 2019 Since the original accepted answer by Michael Krebs in 2012, screens/ui might have changed little bit. Please follow the screenshots below for the latest steps as of today:

godaddy domain management

Then click on add.

godaddy forwarding domain

zennni
  • 1,397
  • 15
  • 12
1

Sounds like your DNS/Name Servers on GoDaddy aren't set up right. They should have the information listed for the Nameservers somewhere where you're hosting the site.

EDIT: I've done some more looking around and it would Amazon doesn't provide you the Nameservers for S3. The "real solution" to this would be to set up a CName on GoDaddy. This site provides a lot of insight on doing that: http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=58317


Also, this question seems to have come up before: Using GoDaddy Domain Hosting to link to Amazon S3 Website

Community
  • 1
  • 1
JToland
  • 3,630
  • 12
  • 49
  • 70
  • 2
    Thank you so much, I've been struggling with this for days :( The blogger link didn't actually give any real answers in terms of what cname record to add for a naked domain, it only talks about creating a cname for www which I already I have. As far as domain forwarding through godaddy, I don't think I can forward my domain to itself (since godaddy treats www.domain.com and domain.com as the same domain for forwarding purposes from what I can tell). The site wwwizer.com from the last link you posted worked like a charm! (don't know how I missed that post, ooops!) Anyway, THNX!!! – empathysage May 04 '11 at 00:04
1

I used the approach described in http://thechrisoshow.com/2011/06/05/how-to-host-a-static-website-on-s3/ (also with godaddy).

It boils down to deleting the A host entry, creating a CNAME entry and using godaddy's forwarding functionality.

For me it is a partial solution. It works if I type jaumebarcelo.info in the url bar.

But it does not work if I click on a link pointing to jaumebarcelo.info

or if I type wget jaumebarcelo.info from the command line.

1

I am looking for the same answer. How I have done it in the past is with an apache htaccess rewrite. I may do it again this way.

RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]

Here is one such page that talks about it.

If you need more help I would google htaccess and apache rewrites.

Benn Wolfe
  • 276
  • 2
  • 6
-1

If no A record and www sub-domain is bound with subdomain it should redirect root domain to www sub-domain. This is how it works with many other sites.

fusionstrings
  • 1,025
  • 2
  • 13
  • 23