I see multiple people explaining how to get this done for any custom domain with sub-domain but nobody speaking concerning how to get it done with out them.

Example: Setting foobar.com and www.foobar.com to point to my Amazon S3–hosted site

Personally, i don't want the www prefix. Can there be not a way to achieve this? I appears crazy that Amazon . com would arrange it to permit static sites and custom domain names, then lock it lower to prefixed domain names?

Thanks ahead of time,

Regrettably you can't point foobar.com for an Amazon . com S3 bucket and the reason behind it has related to how DNS works.

DNS doesn't permit the cause of a website (known as zone apex) to point to the other DNS title (you can't have foobar.com setup like a CNAME / only subdomain.foobar.com could be a CNAME)

For historic reasons any URL must resolve to some subdomain, which you know how to deal with: Produce a CNAME record together with your DNS provider, pointing www for your S3-located subdomain. You will find particulars to obtain right, referred to nicely elsewhere.

You nonetheless wish to support customers who, charmed their browsers will autocomplete http:// and .com and the like, wish to type a naked domain domain.com, and also have it instantly complete for your default subdomain for example www.domain.com.

The simplest way to do this is by using www as the default subdomain, and point your DNS provider's An archive at wwwizer.com ( They instantly redirect any naked domain towards the same domain with www in-front.

You receive quickest turnaround on development, as well as your site visitors get quickest DNS resolution, if you are using Amazon . com Route 53 to supply your DNS services. Route 53 can point its A records to wwwizer.com. However, you might want to produce a micro Amazon . com EC2 instance, and begin programming it. Within the '50s everybody reconstructed their very own cars. Within the 1980s everybody pressed a shopping cart software lower the aisle at Fry's, and built their very own computer. Now, you need to have the ability to build home within the cloud, for a lot of reasons you'll uncover as time passes, and Amazon . com EC2 is better choice. For the time being, your cloud computer only will handle naked domain names for you personally. Later, email, producing the static site, ...

Install the Apache web server (the A in Light a Light server will have the desired effect), and configure an online host for every of the domain names. Then point a flexible Ip at the EC2 instance, increase Route 53 to possess your An archive indicate this elastic Ip. Amazon . com does not support getting multiple elastic Insolvency practitioners pointing towards the same EC2 instance, however, you can offer exactly the same elastic IP to multiple domain A records, and also have Apache resolve this in your EC2 instance.

This takes some fiddling and experimentation, as there are many conflicting suggestions about the particulars. I made use of the ami-ad36fbc4 instance image (US East, 64 bit EBS-backed Ubuntu 10.04 LTS), as I am acquainted with Ubuntu, there's lots of online assist with Ubuntu, which image is going to be supported for a long time. I edited /etc/apache2/httpd.conf to achieve the contents

NameVirtualHost *

<VirtualHost *>
ServerName first.net
Redirect permanent / http://www.first.net/

<VirtualHost *>
ServerName second.net
Redirect permanent / http://www.second.net/

then checked for errors using

sudo /usr/sbin/apache2ctl configtest

then restarted the Apache server using

sudo /etc/init.d/apache2 restart

Apache is standard across Linux tastes, however the particulars for example file locations can vary, e.g./etc/apache2/httpd.conf might be /etc/httpd.conf. For instance, it may be necessary put a Listen 80 in httpd.conf, but Apache throws a mistake in the event that command had been elsewhere. So read web instructions having a touch of suspicion, and be ready to Google any error messages.

As I'd recently been using Amazon . com Route 53 for several days to suggest to wwwizer.com, this labored immediately after i up-to-date Route 53 to suggest to my elastic IP. Before switching to Route 53, each change required days that i can verify, because the information propagated over the web. Once everybody knows to turn to Amazon . com, Amazon . com can propagate its internal changes a lot more rapidly.