Currently, I have an AWS S3 Bucket named www.example.com
setup to host static files and a CNAME record with host www
and target www.example.com.s3-website-some-region.amazonaws.com
.
I would like to set up a DNS record to ultimately resolve the base domain example.com
to subdomain www.example.com
.
I have tried the following DNS record set ups while also having the aforementioned CNAME record ( I APOLOGIZE FOR THE UNDERSCORES, BUT STACK WAS CALLING MY POST SPAM BECAUSE I HAD TOO MANY URLS/DOMAINS. PLEASE REPLACE THE UNDERSCORES BELOW WITH PERIODS ):
- ALIAS Record with Host
@
and targetwww_example_com
which resulted inHTTP ERROR 404
. - URL Redirect Record with Host
@
and destination urlhttp://www_example_com/
which resulted inDNS_PROBE_FINISHED_NXDOMAIN
. - CNAME Record HOST
@
with targetwww_example_com
which resulted in name resolution, but a response from AWS that there is no such bucket ( which makes sense ).
The question from the title "Is there a way to configure DNS records to ultimately resolve a domain (example.com
) to a subdomain (www.example.com
)?" has a stipulation that the HOST HTTP HEADER is www.example.com
( which is what i believe to be the reason why the CNAME record test from above didn't work ).
Why does the ALIAS record result in an HTTP ERROR 404.
Why does the URL Redirect record result in DNS_PROBE_FINISHED_NXDOMAIN error. I setup a URL Redirect record for other subdomains to redirect to the www
sub domain. However, the URL Redirect from the base domain does not seem to work. The browser does not redirect example.com
to http://www.example.com
.
Is there a reason why I can't have a URL redirect record from a base domain to a url?