I have recently created a cloudfront distribution (using the LightSail admin area) for a Lightsail instance running Plesk on Ubuntu. I have created custom domains and validated them and they are "Valid, in use".
My domain is hosted through Route 53. When I delete the static IP address value of the apex domain record by changing the "Value/Route traffic to" an "Alias to CloudFront distribution" and then paste the distribution address, (ex: 123456abcdef.cloudfront.net) the entire site goes down.
My cloudfront address (ex: 123456abcdef.cloudfront.net) is resolving to the default Plesk domain. I just seem to have problems with proper Route 53 DNS configuration.
I have followed the instructions here with no success: https://aws.amazon.com/getting-started/hands-on/map-your-domain-at-route53-to-lightsail/4/
I have also looked at a similiar post on Stack Overflow here: How to apply CDN with cloudfront - router 53 => lightsail instance However, I have not configured my cloudfront distribution in cloudfront, but rather in Lightsail.
Here is an image of my apex DNS Record:
Image of my A record entry
Do I need to create another record in my hosted zone? A record that continues to point the apex domain to the static IP?
Any help appreciated. Thanks.
I am responding to my own question with an answer I think addresses the problem in an alternate way.
I have been trying for a month to set up a CloudFront on my WordPress site running on a Lightsail Instance running Plesk using Route 53 as my DNS provider. I have finally been able to get it running. I installed the AWS for Wordpress Plugin. Follow this guide to set up a user.
Plugin Setup AWS Doc
My preferred domain is www.mydomain.ca. My WP site is setup to direct to www.mydomain.ca NOT mydomain.ca. In route 53 my apex domain (mydomain.ca) points to my static ip. The www.mydomain.ca record is set an ALIAS A record and points to the cloudfront domain name (123456abcdef.cloudfront.net). During set up the AWS WP pluging told me to set www.mydomain.ca to a CNAME ALIAS which will not work. I found some more useful documentation in another thread on SO.
It all seems to be working. However, you need to make sure you do not have any other cloudfront distributions connected to the origin (youdomain.ca), active or inactive, in the Cloudfront admin area OR the Lightsail admin area. This causes a conflict and the set up in the WP admin area will fail.
I hope this post helps someone and saves them a month &%$%ing around with Cloudfront Wordpress setup using Lightsail and Route 53.
Related
I'm starting out on AWS and try to host a website on the platform. The S3 bucket and its content is set up and i'm able to access the website via the url s3 is providing.
Permissions and properties are set to accept public traffic and that the bucket is used to host a website. The index document is correct.
Now i want traffic to be redirected to my domain visionranger.com, but it shows the error "IP address could not be found"
I tested this issue on 4 different devices across multiple browsers (including Chrome, Safari and Firefox).
Bucket, domain and hosted zone do have the same name and as AWS recommends, I asked my previous provider if they transferred the dns services to the new provides (in this case route 53) and they did.
I waited longer than 48 hours after settings everything up before writing this so all services should be working by now - but they don't.
The image shows the dns records of route 53.
I am grateful for any help.
By running a DIG command to get the NS value of your domain it returns a SERVFAIL indicating that the configured nameservers for your domain do not contain the record for you domain.
The next step is to run a whois which indicates your configured nameservers are below:
NS1.BDM.MICROSOFTONLINE.COM
NS2.BDM.MICROSOFTONLINE.COM
NS3.BDM.MICROSOFTONLINE.COM
NS4.BDM.MICROSOFTONLINE.COM
As you're trying to use a Route 53 public hosted zone you will need to update your domain registrar to use the nameservers found under the NS record of the public hosted zone.
Follow the instructions here for your specific domain.
We purchased a domain from GoDaddy, for example, say mycompany.com.
My colleague then moved it to Wix.com to publish our marketing site, which will be available at the mycompany.com url. I need to add a subdomain in AWS, pointing to a Cloudfront CDN endpoint.
To shed more light into the current situation, here is a little more info:
When I check GoDaddy, it shows Nameservers, referencing the Wix servers. For DNS, it says We can't display your DNS information because your Nameservers aren't managed by us.
When I check Wix.com, I see that Managed by Third Party, Connected by DNS and still provides the option to transfer to Wix.
Both Godaddy and Wix provide the option to add a subdomain.
I'd rather do that in AWS.
What is my best option here? Should I transfer the domain to AWS and manage it there? If so, how do I then route traffic from mycompany.com to the marketing site?
Is there a way to keep it as is, but still add a subdomain on the AWS side for example.mycompany.com?
I really regret not registering this domain via AWS in the first place, but lesson learned. Any help would be much appreciated.
I am assuming that your DNS is being hosted via wix.com.
If you want to migrate to Route 53 its not actually too hard. Start by setting up a public hosted zone within Route 53 with the domain name you setup.
Next you would want to perform a zone lookup for all your DNS records, you can use Googles DIG Tool with the ANY option or do this via cli by running dig example.com ANY.
Now that you have all the records you will need to create them within your public hosted zone, follow this tutorial if you need any assistance. Do not add the SOA or NS records.
Now that all records have been migrated get the values from the NS record in your public hosted zone and replace the nameservers within GoDaddy to point at these values.
Your DNS will migrate over whichever period the TTL of your previous NS record is set as. Once this has migrated and it working you can add your CNAME record as you originally wanted to add.
at the first place, we hosted our React App on the S3 to which we assigned CloudFront distribution and then we connected it to somedomain.com domain.
The thing is that for marketing tests we had to change A-record in Route53 to point to a totally different server than AWS. So the problem is that some of the users already used our React App with ServiceWorker that was hosted on S3, and even that we changed A-records to point to different server - they still see AWS cached version.
We have no idea where is the problem, and if we should change something in Route 53 or Cloudfront?
I have come across this before, but don't have a good explanation as to why it happened.
I had to remove the domain from the CloudFront distribution before I got all traffic being sent correctly to the new record in Route 53.
After removing the domain from the CloudFront config, traffic immediately started being sent to the value in the A record in Route 53.
Hope this helps.
I have a website that is a herokuapp app. For the past 5 years I regsitered the domain of this website / app with godaddy, and made the configuration necessary in the DNS and forwarding to the heroku address.
last month I decided to switch over to route 53 and AWS, I filled out the relevant forms and released the domain from godaddy , the transfer succeeded, and the domain is registered with route 53.
I thought that I would have to go in at one point and configure route53 to use the configuration I did in godaddy ( forwarding to heroku ) but somehow without doing anything the domain is working and the forwarding is there.
I have no problem , I just want to know how did this happen? if Route 53 automatically picked up the configuration from godaddy ( which is what I assume happened but would like to know more ) where in route53 can I inspect the configuration ( in casr I want to modify it in the future ).
Thanks.
Update :
After some digging around on www.whatsmydns.net I found out that my site Nameservers are ns44.domaincontrol.com. I called godaddy customer support asking them about this and they said that when they get a request to transfer a domain everything is migrated over (assuming to route53 )
I don;t know when will this expire from ns44.domaincontrol.com, but I still haven;t gone to route 53 and started the process of creating a hosted zone and other details, I am afraid its gonna mess up the existing setup , so If anyone has experience and can recommend a course of action I appreciate it.
When you transfer your domain to AWS Route53 there's an option to keep existing nameservers. You probably chose to do that. But it's not advised as mentioned here in AWS doc:
If the registrar for your domain is also the DNS service provider for
the domain, we highly recommend that you consider transferring your
DNS service to Amazon Route 53 or another DNS service provider before
you transfer your registration. Some registrars provide free DNS
service when you purchase a domain registration. When you transfer the
registration, the previous registrar will not renew your domain
registration and could end your DNS service at any time.
Source: Transferring Registration for a Domain to Amazon Route 53
I have a hosted zone in Amazon Route 53 service and a domain name on a registrar.
In the registrar, my DNS configurations are correctly inserted, with the four address provided by AWS when I create the hosted zone.
In the Route 53 control panel, I have the NS and SOA proper configured as it came configured when I created the hosted zone.
I also created a A Redirection : mydomain.com.br -> xxx.xxx.xxx.xxx (elastic IP)
I'm able to reach my EC2 instance with the A Record: If I type mydomain.com.br on browser it works fine.
My problem is that I'm unable to reach the CNAME's that I've created.
I have a CNAME rule: www.mydomain.com.br -> mydomain.com.br/site but when I put www.mydomain.com.br I get a DNS error on my browser.
The strangest thing is that if I consult www.mydomain.com.br on a site like https://www.whatsmydns.net it points to www.mydomain.com.br/site, which is the correct redirect. The DNS resolution aparently works fine, but I can't get it on the browser.
Any help would be nice. Thanks.
ps: I alredy tried to ipconfig/flushdns and clear chrome's cache
Try this:
Delete that CNAME record
Add an A record in Route53
Name the A record 'www' it should automatically make that www.mydomain.com.br.
Check the ALIAS-yes box
Select mydomain.com.br. from the dropdown box (note there is a PERIOD on the end)
Save and Wait about 5 minutes.
A better (and still very cheap) way to do this might be to set up a 301 redirect in an Amazon S3 bucket. Here is a link to Amazon's tutorial:
http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
Do you have a "www" A record which is pointed to your EIP?