06
Jul
11

Get Network Solutions to point at an S3 instance, even with a naked domain

Wow. First off, Amazon Web Services just got really cheap. Cheap as in free – most of the time. I won’t go into detail, because, well, this is the web after all and details are so very fluid, but you should check it out.

So, I set up a static site (for now, anyway) on S3 (Simple Storage Service – I didn’t know that until recently) and a virtual machine in EC2 (Elastic Compute Cloud – didn’t know that one, either). I have a domain through Network Solutions, and I couldn’t for the life of me figure out how to point a naked domain, e.g. http://thomasqbrady.com – without the www subdomain, to the S3 instance without domain-masking.

Domain-masking, if you didn’t know, is a fancy product name that Network Solutions uses (I think the term has real meaning in other uses) for a frameset on your page. The top frame is a page on Network Solutions’ server somewhere with a fixed IP. The bottom frame is your site, wherever that might actually be hosted. That way you get an A record DNS name (their fixed-IP server) with your domain name, but you get to point wherever you like. Normally, you have to have an IP address for an A record. Amazon’s EC2 and S3 only give you DNS names (URLs), unless you pay extra.

You can set up on Network Solutions a domain forward (which will imediately redirect your users to your actual URL) instead of a domain mask, but then your users will see your ugly S3/EC2 domain names.

You might be thinking, “Just use a CNAME, dummie!”

Rude.

CNAMEs are great. I can use a CNAME to point any subdomain to a URL. For instance, I’m pointing projects.thomasqbrady.com to a Redmine instance on the EC2 server. I’m also pointing http://www.thomasqbrady.com to the S3 instance that way. If I didn’t care about the naked domain (and, realistically, it’s not that big a deal), then I could just be done with that. CNAMEs to the rescue.

But I would lose sleep over the stupid naked domain issue.

So here’s how I did it

It took me hours of tinkering to think of this. Many of you might have known right away. But I never saw this documented anywhere or found anyone else saying this worked. But it’s currently working for me.

This setup works on Network Solutions. It might work elsewhere, but that’s the only place I’ve tried.

  1. Setup domain-forwarding, forwarding your top-level domain (thomasqbrady.com in my case) to the www subdomain (www.thomasqbrady.com in my case), but without the domain-masking.
  2. Wait a bit for this to take effect.
  3. When it has, edit advanced DNS settings.
  4. Delete your A records for www and *, but leave your @ record.
  5. Now create your CNAME records for www to point at your S3 instance.
  6. You’re now forwarding from the naked domain http://%5BYOUR DOMAIN HERE] to the subdomain http://www.%5BYOUR DOMAIN HERE], which is a CNAME mask for your S3 instance, [BUCKET NAME].s3-website-us-east-1.amazonaws.com
Advertisements

1 Response to “Get Network Solutions to point at an S3 instance, even with a naked domain”


  1. 1 Ramon
    March 13, 2012 at 4:25 pm

    I’m in the middle of doing this now with Network Solutions. I ended up just doing forwarding and then checked for the forwarding to alias the domain so it always stays as the URL i want instead of AWS’s. Thought about doing what you did but never got that far. I couldn’t delete www tho I could delete the IP. Once I did this and setup a CNAME for www I was getting DNS errors on pingdom though it was working. For naked domains i was going to use wwizer. I think the 12$/yr for aliased domain forwarding from network solutions is fair enough and avoids the headaches of any time of work around.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: