I have a domain address with NameCheap. I followed all of the documentation for setting up a hosted zone with Route 53 for my AWS account. I deployed my website and checked to see if it worked using the endpoint URL. It worked fine. After that, I took the 4 NS urls from the Hosted Zone and mapped them in NameCheap following a tutorial I found online. I chose a Custom DNS for the Name Server and placed the 4 NS urls.
This all worked fine, when I go to my domain: www.example.com it shows my website. However it changes the URL to http://example.com.s3-website-us-east-1.amazonaws.com/
Is there a way to get it to say www.example.com and not the Amazon endpoint?
It appears that this only happens when I go to www.example.com. When I go to example.com, the url stays as example.com and doesn't change to the end point like it does for www.example.com.
Is there a step I missed?
I have 2 buckets: example.com and www.example.com. www.example.com bucket redirects to example.com as described in the AWS tutorial.
http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-hosting-your-website.html
You need to create another s3 bucket named www.example.com, and configure it to redirect to example.com.
Related
I have hosted a static website on AWS S3 with a custom domain (purchased from crazy domain). I have obtained SSL certificate from AWS ACM.
I need to redirect bare domain "example.com" to "https://www.example.com".
Following are the steps I have followed so far -
Created 2 buckets on S3 - example.com (Used for redirection) and www.example.com (Used for website hosting)
Created 2 cloudfront distribution -
One with "Origin Domain Name" as "example.com.s3.amazonaws.com" and another with another with "Origin Domain Name" as "www.example.com.s3-website-ap-southeast-2.amazonaws.c
om"
Created CNAME record set on crazy domain with WWW pointing to cloudfront distribution as
Added "A" record set in Route53 for both cloudfront distributions.
When I enter example.com in Firefox and Safari, it is redirecting to https://www.example.com but in Chrome it is showing This site can’t be reached
Can anyone please let me know if there is anything specific I need to do for Chrome?
Finally I have figure it out as -
Added NS record set from Route53 to Crazy domain
Removed CNAME record set with www
Added Web Forward record set in crazy domain
I have seen a few questions about this but the answer is not working for me. I want to redirect the naked domain to www. I have my site deployed in a S3 bucket and a Cloudfront distribution.
This questions are similar:
https://serverfault.com/questions/576461/redirect-non-www-requests-to-www-on-amazon-route-53
How do I redirect a naked (apex) domain to www using Route 53?
This is what I have:
A static website in a S3 bucket: www.mysitename.com
Another website (empty) in a S3 bucket: mysitename.com configured to be redirecting everything to www.mysitename.com
A cloudfront distribution over the bucket www.mysitename.com
Route 53
Everything works well in the www.mysitename.com domain, but the naked domain is not working.
The ways it's configured in Route 53 is the following:
A Record, www.mysitename.com with Alias to my Cloudfront distribution (works perfect).
A Record, mysitename.com with Alias to my S3 bucket.
If I go to my "mysitename.com.s3-...." S3 bucket it redirects correctly to the other bucket. But If I go to the naked domain, it doesn't work.
The error I get is:
This site can’t be reached xxxxxxxx.com took too long to respond.
Try: Checking the connection Checking the proxy and the firewall Running Network Diagnostics ERR_CONNECTION_TIMED_OUT
It resolves to a Amazon S3 IP correctly. If I go to the IP it opens https://aws.amazon.com/s3/.
What am I missing?
https://forums.aws.amazon.com/thread.jspa?threadID=55995
Shortcut:
Just point your naked/root domain to 174.129.25.170 and all requests to example.com will be redirected to www.example.com
No signup needed, uptime is published on a website.
It is an EC2 instance doing only redirects.
Full disclosure: User "Dima" made this service.
I've got a domain name (example.com) which I've purchased through namecheap. The website is a just static site that I recently decided to switch over to S3. Following the instructions on the aws website I've:
Created two buckets: example.com and www.example.com
Configured the example.com bucket to be a static website and placed my files in it.
Configured the www.example.com bucket to redirect to the example.com bucket
Created a hosted zone for my domain
Placed a type A alias for example.com in my hosted zone that points to my example.com bucket
Placed a type A alias for www.example.com in my hosted zone that points to my www.example.com bucket
Taken the nameservers from the NS record in my hosted zone and in namecheap set my domain to use them.
When I go to example.com it works just as expected. When I go to www.example.com it takes me to my website correctly but it shows www.example.com.s3-website.us-east-2.amazonaws.com as the domain. I haven't been able to figure out how to get it to point to www.example.com instead. Where have I gone wrong?
Configured the www.example.com bucket to redirect to the example.com
bucket
You want the actual redirect url configured in S3 to be https://example.com, not the url of your example.com bucket. Just update that and you should be good to go.
I'm learning some web development and am using Amazon S3 as a web host with a custom domain from Google domains. I used the guides from the Amazon AWS page and was able to set up the web page but I have a problem with getting the custom domain to work.
For example, Amazon S3 has the endpoint URL to www.example.com.s3-website-us-east-1.amazonaws.com and I want my domain example.com to show up. When I load the page for www.example.com, it loads the page however it still shows the example.s3-website-us-east-1.amazonaws.com when I want it to show the simple example.com instead.
From what I can tell, I need a CNAME, I've set it up as www.example.com -> www.example.com.s3-website-us-east-1.amazonaws.com with permanent redirect (301) and forward path.
Please help!
If anyone was wondering how I got it to work, I ended up using Cloudflare with its free DNS options. I added the DNS servers to google domains and then added two CNAMES:
# -> example.com -> example.com.s3-website-us-east-1.amazonaws.com (for the root)
CNAME -> www -> www.example.com.s3-website-us-east-1.amazonaws.com (for the www redirect)
On the Google side, configure the CNAME record (www) to point to s3.amazonaws.com. (yes, the dot included) ... like this:
... and wait a few minutes.
Make sure your S3 bucket is named: www.yourdomain.com
I'm using route53, elb, ec2 in aws.
I have set example.com connected to elb.
It works fine.
Currenlty, I'm trying to connect www.example.com to example.com,
and I'm stuck.
I checked whether I can connect test.example.com to example.com,
and It worked. Either using CNAME or using s3 static website hosting
(redirection) worked.
But for www.example.com, these methods doesn't work,
and I'm not figuring out why.
Thank you for answering my question.
I'm updating the details.
I have set my domain example.com on Route53, and I can access to it. I also wanted it to be accessible with www.example.com, so I added a CNAME record www.example.com pointing to example.com. However, my browser failed to load www.example.com.
I tried another method, S3 static website hosting. I created a bucket named www.example.com, made it redirect to example.com, and got a s3 url. I added a CNAME record www.example.com pointing to the s3 url. Again, my browser failed to load www.example.com.
I changed my approach.
Instead of www, I decided to test test.example.com with the same methods that I tried, and it worked fine. My browser loaded test.example.com successfully.
When I tried to access test.example.com, it fails to load fast when it's not configured. On the other hand, with www.example.com, the browser displays loading message on the status bar for a long time, and shows white blank screen.
I want to make it work with www.example.com
You haven't said exactly what you've done to redirect between mydomain.com and www.mydomain.com so it's difficult to tell you why it isn't working.
I have my personal domain set up in this way, where the bucket mydomain.com is set up in S3 to "Redirect all requests to another host name" and that host name is www.mydomain.com (see the "static website hosting" section in the bucket properties).
I notice that in Route 53 I have A records set up for both mydomain.com and www.mydomain.com and in both cases I have aliases set up aliasing the target s3-website-eu-west-1.amazonaws.com. to a hosted zone ID. I don't remember doing that though!