I have two AWS buckets
The www one hosts a static website and the # one redirects to the www one.
My namecheap's domain Advanced DNS settings are configured like this
I've waited about 12 hours, but when I go to my Namecheap domain, I get an ERR_CONNECTION_TIMED_OUT
I've deleted all of the original CNAME & A records, did I make a mistake doing this?
What am I doing wrong?
As #stdunbar suggested:
It seems to be working fine - perhaps you've got the old address
cached in your environment.
I cleared my cache and it now works without any problems!
Related
I have a domain that I got from NameCheap: www.app.flerr.io.
I configured the domain in AWS with Route53, CloudFront and S3.
I uploaded the static website to the relevant S3 bucket.
When I try to reach my website, I get the following error: ERR_NAME_NOT_RESOLVED.
Although, when I reach the website through S3 static website hosting it's working:
Any ideas?
EDIT:
Route53:
I have one A record that traffics to <id>.cloudfront.net:
I have one NS record that traffics to 4 NS URLs.
I have one SOA record.
I have one CNAME record.
ERR_NAME_NOT_RESOLVED usually refers to a DNS problem.
You already verified that S3 URL is working correctly.
Now, verify that Cloudfront is working correctly by pasting the Cloudfront URL in your browser (<id>.cloudfront.com or something similar).
If both of them are working, means that your problem is indeed DNS (and therefore Route53) related.
Use any DNS Lookup page to see if your domain (flerr.io) is correctly set up.
https://mxtoolbox.com/SuperTool.aspx?action=a%3awww.app.flerr.io&run=toolpage
With the information given that's the best we can do, if you share your Route53 Hosted Zones we could see if anything is wrong
If you bought flerr.io. - you dont need to create a new zone for app.flerr.io. (you can, but its not required - this is called DNS delegation). You just need to create a record named www.app inside flerr.io. as an A or CNAME to your destination.
When i use dig to test the DNS i get the following results:
dig flerr.io. shows A records
dig app.flerr.io. shows A records - and appears to be its own DNS delegation zone (was that deliberate)?
dig www.app.flerr.io. does not return any records - this is why you cant resolve your site.
I think the solution for you is to create the www.app records in the flerr.io. zone and ignore the app.flerr.io. zone you created. If your trying to use the zone app.flerr.io. (and its been setup properly in flerr.io.) you would just create the www record.
I’m using CloudFlare as a hosting provider for my website, and AWS S3 to serve my static content. From CloudFlare I created a CNAME for my root domain (example.com) that points to my S3 bucket’s static url. This is currently working (see below).
However, when I try to set up a subdomain (www.example.com) CNAME record on CloudFlare that points to my root domain (example.com) my website doesn’t render. I’ve also tried pointing the subdomain to the S3 bucket url, but that doesn't work either (because the S3 bucket name has to start with www.example.com, not example.com).
Knowing this ^, I created an S3 bucket that starts with www.example.com and redirected it to the root domain bucket that serves all the content (example.com-bucket). However, this didn’t work either.
Another theory I had was to create an AWS Route 53 hosting zone, so I did that as well (see below). However, none of the records I created in Route 53 made any impact.
If anyone has any suggestions it would be greatly appreciated! I’ve looked at various documentation from AWS, CloudFlare, and StackOverflow, but nothing seems to help
A much simpler solution, that doesn't require creating extra S3 buckets and redirect rules in S3, is to create a page rule in Cloudflare that forwards/redirects www to the root domain
I've got 5 records in my AWS Route 53 hosted zone:
First is an NS for my domain name.
Second is SOA for that domain.
Third is a validated CNAME for it.
Fourth is cloudfront distribution A alias for it with the www prefix.
Fifth is validated CNAME for the www version.
I don't yet have an SSL attached to it.
It works - well partially.
Trying to reach the unprefixed version of the domain from Chrome doesn't work, but if I type the domain with the www prefix it works.
Firefox automatically redirects the unprefixed domain to the www variant. I type the unprefixed name making sure it's not redirecting because the prefixed name is in the search history. When I hit enter, Firefox automatically redirects to the www.
I'd like the main name to be accessible, not just the www one. It's OK if someone types the www. They should get to the site, but the actual name has no www.
I'm inexperienced enough not to be certain about that www prefix or why it is necessary. This was the result of a long course on AWS services.
Can anyone tell me if I'm missing a needed record, or if I'm improperly using the Alias A record?
Edited to add this below after reading first three answers. Thank all of you who answered for your responses. I do appreciate them. Please see my comments on those answers. --
I'm attaching a screenshot of my Route 53 hosted zone settings to maybe help you get a clearer picture of where I am.
Please remember. I'm not starting with a domain with a site that I wanted to host on S3 and then redirect www.mydomain traffic to mydomain.
I began coding an app with no domain. Then I uploaded it to an S3 bucket. I then was able to access it's simple S3 hosting with the ugly url. Then I used CloudFront for a world-wide distribution, again with an ugly url. Only then did I try taking one of my owned subdomains and redirecting it to Route 53. It wasn't as clean and simple as buying a domain from Amazon. I had no SSL and had to make a request for the AWS Certificate Manager to process validation of my domain. I got all that.
My problem is as I tried to explain - Chrome won't recognize or redirect my main domain name without the www. It only recognizes if one types the www. in front of the domain name. On the other hand, Firefox automatically redirects no matter what you type (the www version or the one without the www). That redirection is to the www version (that is what shows in the url bar in the end - http://www.mydomain).
I think I may have figured out most of this. As I mentioned in my comment above, I noticed I didn't have an Alias record for my main domain. I also read in AWS documentation that my S3 hosting bucket should have the same name as the domain, so I did that.
After creating the new original S3 hosting bucket I had made another to keep the log files. I set up a CloudFront Distribution. Then I requested and got SSL certificates for my owned domain name and added another for the www version. With those successfully enabled, I transferred my registered DNS servers to AWS. That created the NS and SOA records when I created my R-53 hosted zone. I then created Alias records for both the man and www version and added the validated SSL certificates for both the main domain and the www version. So, a total of six records in the zone.
I created my new S3 bucket, naming it the same as my domain; copied the settings from the old one, set it up to host static single page site and generate logs. I had already created a bucket for the logs, so I just pointed the logs location for the new domain named bucket. I gave the regular logs a log prefix (folder) and the CloudFront logs a cdn one.
Everything works great except I discovered a new problem. I'll post a new question regarding that, something like XML error on browser refresh in child pages.
Thanks ALL!
I have a working website at example.com that is stored in my S3. I bought my domain from google so it was a bit of trouble, but I transferred all my MX,CNAME, and other records. Now I have one hosted zone called example.com, inside it are all of these said records, plus amazon's default SOA and NS records. I tried making an A record to my www.example.com and it showed an error since a CNAME value had already taken up that slot. the CNAME's record looked like this:
www 3600 IN CNAME ghs.google.com
Unfortunately this did not work in terms of directing the www version to the no-prefix version of my website as it gave a DNS error. So I deleted this record and created an Alias with the name www.example.com and then connected it to my S3. (I know my S3 works because I checked the links that S3 provides).
It has been 12 hours and I still see no change in the behavior of looking up www.example.com. I should also note that I was fiddling around and created a new hosted zone for my www.example.com and followed the configuration and even added the 4 pieces of NS to my original DNS provider. I soon deleted them when I figured out this wasn't the correct method.
Please let me know of any suggestions. Thank you.
Turns out that it took 24 hours, not 12. So I guess the answer here is that patience is key! Thanks for attempting to help if you did!
I am moving several sites to S3 to host them as static sites and have moved DNS here as well. I followed the AWS guide step by step, but continually get an error on the CNAME setup for WWW. Here is my setup:
Created bucket jeremyandlauren.com and set up static hosting and permissions.
Endpoint is now jeremyandlauren.com.s3-website-us-west-2.amazonaws.com and this works fine.
Pointed nameservers for this domain to Route 53.
Created an A record pointing to the Alias Target jeremyandlauren.com.s3-website-us-west-2.amazonaws.com.
Created a CNAME pointing www to jeremyandlauren.com.s3-website-us-west-2.amazonaws.com.
Now when you hit the URL either with or without www you get:
Code: NoSuchBucket
Message: The specified bucket does not exist
BucketName: www.jeremyandlauren.com
Does anyone have any ideas how to fix this? I have tried a couple options for the CNAME, but nothing seems to take.
Thanks in advance.
It looks like jeremyandlauren.com works, however, www.jeremyandlauren.com does not work. The reason you are probably running into this is that your DNS name needs to match your bucket name. You probably do not have a bucket with the name of www.jeremyandlauren.com. There are two way easy ways to fix this.
Create a bucket www.jeremyandlauren.com and redirect it to jeremyandlauren.com. (More info here: http://aws.amazon.com/about-aws/whats-new/2012/10/04/web-page-redirects-on-amazon-s3-hosted-websites/)
Create a CloudFront distribution with the origin of jeremyandlauren.com.s3-website-us-west-2.amazonaws.com. Add www.jeremyandlauren.com & jeremyandlauren.com as a CNAME. Update DNS for www.jeremyandlauren.com & jeremyandlauren.com to be an A type alias to your CloudFront Distribution.
Keep both www.jeremyandlauren.com & jeremyandlauren.com buckets in sync with the same data.
Its working fine for me - both with and without the 'www' if its not working for you, it may be because your dns is cached locally, or the propagation has just not made it to your servers yet - give it time.
If you are using chrome you can try clearing your local dns cache:
Navigate to chrome://net-internals/#dns and press the "Clear host cache" button.