Migrating of DNS from GoDaddy to AWS - amazon-web-services

I have a GoDaddy URL that I want to migrate to my website hosted on AWS EC2.
I have followed the steps to transfer the DNS by setting up a hosted zone on Route 53, copying the four Nameservers and saving them in GoDaddy as custom Nameservers.
This was three days ago and the change has still not taken place.
Any ideas as to what I have done wrong?
The url is: www.swsportspsychology.co.uk
These are screenshots of the AWS and GoDaddy accounts:

It appears that the domain is not registered!
I would recommend that you double check that GoDaddy actually took payment and submitted the registration - perhaps its still in progress however, I doubt this as you have stated its been 3 days.
Alternatively (and I would recommend this) if you plan to use this domain with AWS why not register it within AWS in the Route53 Service. As you can see from the image below the domain is available for registration in the AWS Console.
This will make management a lot easier in my opinion, however if you choose to pursue the GoDaddy registration it does look like you're all correctly configured to host that site's DNS when the registration takes place. Good work!
Update: Adding a DNS record to your domain
In this example we are going to configure the A record for your domain and WWW to point to your EC2 Instance.
Open EC2 and highlight your instance, make a note of the Public IP and the Pubic DNS values. Keep these handy.
Open Route53 and click your hosted zone "swsportspsychology.co.uk"
Click the Blue "Add Record" button.
Using the panel on the right hand side;
Leave the Name value empty
Ensure the Record Type is "A - IPV4 Address"
Leave Alias set to "No"
Leave TTL as the current value
In the Value field, type in the Public IP of your EC2 instance only.
Click Create
This will create a record for swsportspsychology.co.uk that will take you to your EC2 instance. Now to setup WWW.
Click Create Record Set again
Using the panel on the right hand side;
Enter "www" in the name field
Ensure the Record Type is set to "CNAME - Canonical Name"
Ensure that the Alias value is set to "No"
Leave the TTL value as the default value
Set the Value field to be the Public DNS value for your EC2 instance that you recorded earlier.
Click Create
You should now be able to access your website by visiting "www.swsportspsychology.co.uk"

Related

How do you get an Elastic Beanstalk website to work to be accessible via a .work extension from Hover via Route 53?

I'm trying to get the website I've set up in Elastic Beanstalk live. I bought a domain www.semiflex.work from Hover.com. I understand that I need to connect my domain to Elastic Beanstalk via Route 53, but I'm getting a lot of conflicting information as to how I can do this.
I've tried creating CNAME record sets in both Route 53 and Hover as an Alias with a link to my Elastic Beanstalk website, but that didn't work. I then also replaced the nameservers in Hover with the ones in Route 53, but that didn't work either. It's been roughly 4 days and I can't get my site to run on my new domain. How would I go about getting this to work?
Thanks in advance.
Using Route53 to manage your DNS is simple and straightforward.
Go to to Route53 and create a hosted zone for your domain. As soon as you create your hosted zone, Route53 will generate two default entries: a SOA entry, and an NS entry with 4 nameservers that you assign to your domain in order for Route53 to manage your zone file.
Next go to your domain registrar, in this case Hover, and update the nameservers of your domain to the nameservers provided by Route53.
Now that Route53 is managing the zone file for your domain, you can create an appropriate entry for your ElasticBeanstalk app. Open your domains hosted zone and select “create record set”. On the right hand side, you’ll be able to enter a sub-domain (optionally), like www, next you’ll be able to select the type of record this is, such a an A, CNAME, MX, TXT or other. If you’re using your domain with another AWS service like Elastic Beanstalk, CloudFront, or S3, you’ll want to leave the type as an A record and then in the next section you’ll set Alias to yes. Now, in the target, you’ll either select where you want Route53 to Alias to from the available option in the current account, or if you’re aliasing to a supported service in another account you’ll enter the target such as the ElasticBeanstalk or CloudFront URL.
Click “save record set” and the entry will be live within seconds (assuming the DNS has propagated).
Now that Route53 is managing your DNS, and because IP addresses for services can change, your DNS will not need to be updated because Route53 will automatically take care of updating the destination for the record if/when it changes.
We went through your issue and noticed that you must have misconfigured your route53 settings. You do not need to create an CNAME record for routing your domain through elastic beanstalk environment. Just need to create a record set by enabling Alias and selecting Alias target as your environment URL in the dropdown list.
To do so go through -->> Create Record set -->>Click on Alias -->>Select Alias Target.
This will resolve your problem assuming that you have updated name servers in domain registrar.
Ended up solving this the old fashioned way.
AWS part
On Route 53, create a hosted zone. In that hosted zone, create a record set that is Type A - IPv4 - address, Alias Target = your elastic beanstalk url. Save record set. Then click on that record set, and then click on the button "Test Record Set." Then click "Get Response." Copy the I.P address "in Response returned by Route 53"
Hover part
Set Nameservers on hover = ns1.hover.com, ns2.hover.com. Then click on "DNS" and add two records where Type = A, Host = *, Value = your Route 53 I.P address & Type = A, Host = #, Value = your Route 53 I.P address.
Can take up to 48 hours to work, but it works!

Static website on S3 with route 53 - Site can't be reached

I have hosted a static website on S3 with suitable bucket policy set. Viewing the "endpoint" in another tab works perfectly fine. After this I created a Hosted zone in route 53 to give it a desirable human readable address.
After creating the hosted zone, I have two records in my newly created hosted zone, One being of type NS and the other being of type SOA. So far so good. I go ahead to create a new record set.
I add the name as desired, enter type as 'A' - IPv4 Address tick yes for Alias, where in the drop down (Alias Target) i can see my previously created bucket endpoint.
I set the routing policy to be simple and Evaluate Health Target set to no. The record set is created successfully. However when i enter this name in another tab, I get the "Site can't be reached". I try and test the record set using the functionality provided by AWS. Here the response code i get is "NOERROR" which i assume is a positive response. Am I missing something here.
I have also referred to this video. Am I missing something. Also, I have not created the Hosted Zones myself.
A hosted zone is not the same as domain. You have to update the NS values for your domain registrar to point to the NS values as generated by Route53.
From the docs:
When you create a hosted zone, Amazon Route 53 automatically creates a
name server (NS) record and a start of authority (SOA) record for
the zone. The NS record identifies the four name servers that you give
to your registrar or your DNS service so that DNS queries are routed
to Amazon Route 53 name servers.
[...]
After you update the settings with your domain registrar to include
the Amazon Route 53 name servers, Amazon Route 53 responds to DNS
queries for the hosted zone even if you don't have a functioning
website.
NS transfer may take from 1 to 24 hours, depending on the registrar.
I faced the same issue. I bought domain thevegfoodies.com through AWS Route 53, created simple index.html page and uploaded to bucket thevegfoodies.com and set bucket for Static website hosting ,added public policy. created second bucket www.thevegfoodies.com and redirect to thevegfoodies.com, created aliases everything , read through documents everything. But nothing worked.
Until, i realized that my redirect bucket www.thevegfoodies.com was not set for public read access. I set it too Read bucket permissions for Everyone. (Note my primary bucket thevegfoodies.com already has public access.) and i could load my website using my domain name.
Now, I have read through AWS document again just to see if I missed this step of setting up public access for redirection bucket.
https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html and all other steps to setup static website.
if you check Step 2.3: Configure Your Website Redirect, it is not mention that we need to set public access.
POINT- AWS Documentation is not clear. One need to have public access to redirect bucket too.

Cross Account Alias Records

Is it possible to create an Alias record in Route 53 to a resource in another AWS account?
Use Case:
I have 2 AWS accounts. My domain is configured with a hosted zone in account A and I have an ELB in account B. I want to create a record to my ELB in account B for my domain's zone apex - which has to be configured in account A.
Does anyone know how I can get around this? I know I can go through billing support to have the domain transferred to account B but I would prefer not to do this. Also, it is not viable for me to migrate the resources from account B to account A.
So I've found the solution. You can in fact create an Alias record to a resource in another account.
The answer is in the documentation although it's description is a little vague in my opinion. See here under the ELB heading.
If you used different accounts to create your Amazon Route 53 hosted zone and your load balancer – Enter the value that you got in the procedure Getting the DNS Name for an ELB Load Balancer.
As a result, here's what I did:
Copied my ELB DNS name from account B
In account A, I created an Alias record for my zone apex (type: IPv4) and I simply pasted in the DNS name into the text field.
I saved the record and it worked straight away.
After you paste in your ELB's DNS name, you'll notice that the Alias Hosted Zone ID matches the Hosted Zone ID in your ELB's description tab.
I can confirm this is still working, it's just the docs and UX of the portal are terrible.
I wanted to create a CNAME to an ALB at the apex (root) of my hosted zone; this isn't allowed so using an Alias A record instead. My ALB is in a different account, so the UI makes you think you can't do it... but you can.
You can create an Alias record to an ALB/ELB in another account by just pasting into the 'Route traffic to' box. Choose the region, then just dump the address into the box. Now this UI element makes you think it's a normal picklist and you can only pick from valid values... but it is secretly also a textbox allowing you to enter arbitrary text. Great UX guys 👏🏼
So enter your address and just click 'Create records'.
Now AWS updated the Alias records info and it is much more clear, basically you add the DNS entry for the resource in the alias field.
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-alias.html
For those who're looking for why it doesn't work after you followed the procedure:
that is probably that you have another domain in the other account, in this case, don't forget to add a listener rule to the target ELB.

link a Google Domain to Amazon ec2 server

I am using an Amazon EC2 instance to serve a node.js app. I recently purchased a domain name through Google Domains and I want to use that domain name to access my node.js app.
The Google Domains console allows you to forward your domain traffic to another website. I set it to forward traffic to the public IP address of my EC2 instance. I can access my app just fine now, but when I type www.myDomainName.com into a web browser, the URL bar immediately changes and displays the digits of my EC2 IP address.
I would like the URL bar to display the name of my domain instead.
Note:
I have read a few SO questions related to this and can't figure it out. Some of them are a bit over my head. Many of them say to use an Amazon Elastic IP, but I don't understand why this is necessary if the public IP of my EC2 instance seems to work just fine. If the solution here is to use Amazon Elastic IP, I would really appreciate an explanation as to why that is necessary,
It sounds like you are using Google Domains to redirect to another site once the request has hit the Google servers. This is fine and dandy if you have another domain you are wanting to redirect to.
If you want it to stay under your domain name, but point to another location you need to actually change the DNS entries for your domain.
Go to Google Domain services and change your master(*) (A) record, as well as your WWW (A) record, to point at your public IP address. That way when a DNS request is sent for your domain it will just ask Amazons' servers what to do instead of using a redirect from Google.
Exact Steps:
From the Google Domain Website, click the Middle Tab () to open DNS settings
Fill out the form near the bottom of the page titled, Custom Resource Record
Name: In this scenario we want to use "#" or "www"
# is the root record (or anything not specifically set)[all]
www is the record for when people type www.example.com
Type: There are two types; A refers to IPv4 address and AAAA refers to IPv6 address
You can set both of them separately, generally you want to use the A [IPv4]
TTL: Time to live, recommend leaving 1hr (this is an advanced attribute)
Data: The actual IP address you are wanting to point to (your website)
Example: 8.8.8.8 [Google Nameserver]
Now that are the blanks are filled out, press the "Add" button
Wait for the records to be updated publicly
This will take approx. 1hr (as long as you kept TTL at 1hr)
This step can take longer depends on Google's servers
Check your website www.example.com to confirm it has updated
Addendum to Zax's Answer
While Zax's answer is fully accurate, it looks like it wasn't sufficient to help out the OP, and maybe not for others, too.
When you go to Google Domains (at least as of March 2017), you'll see several different tabs. The middle tab, which looks like is the tab to configure the DNS. Chose that tab.
Near the bottom of the page on the DNS tab you'll see a section Custom resource records. Within that section, you can add more entries. An entry consists of:
Name: this is briefly described by Google, but in short, likely you'll either want to use # or www, where the former means "root level" and the latter means "www subdomain".
For instance, if you registered imsocool.com, then # points to imsocool.com whereas www points to www.imsocool.com.
Type: you'll probably either want A which is an IPv4 Address or you'll want AAAA, which is an IPv6 Address. (That's assuming you're trying to point to a website, not an e-mail server or whatever else.)
TTL: time-to-live, I don't think you'll need to worry about it much, so just use the 1h (one hour) default.
data: again, presuming you are pointing to a website, that will be the actual IP address. E.g., 54.49.66.128, or whatever your IPv4 (or v6) server address is.
Once you've filled in all the blanks, simply hit the blue "Add" button.
Wait a while for the DNS update to happen.
The most it should take is 1 hour, if that's what you had placed above. But it could potentially be much quicker.
Then check to see that all is working by visiting your site using the name, e.g., imsocool.com.
In your google domain admin dashboard, select the dns configuration of your domain name.
Go to Custom resource records and set a new record with the subdomain you require: for the site webapp.example.com use webapp and select Type A. Leave blank the ttl field and add you public IP from the amazon EC2 instance. Then just browse the site webapp.example.com and it will retrieve the site on your EC2 under the domain name.
If you need to redirect the www.example.com domain then just add a record with www, also selecting the type A and adding your public IP from your EC2 instance.

How to move a domain from Godaddy to AWS Route 53

Since Godaddy went down for some hours my client and I are very upset and want to change everything to AWS.
Everything is done so far, only the domains (blablabla.com) are missing, I'm having a hard time trying to migrate from godaddy to Route 53, Do I have to remove from one and create from scratch from AWS?
Does anyone have any experience on how to do this?
the solution:
Login on your aws console;
Click on Route 53;
Create Hosted Zone;
Select your new created host title and click "Go to Record Sets", take note of the nameservers;
Login on your Godaddy account;
Select your domain;
Go to Nameservers and click SetNameservers;
paste all the four you took from "Go to Record Sets" Route 53;
and that's it..., you don't have to rely on this horrible service Godaddy provides anymore
You can transfer the domain registration to AWS Route 53.
You have to "unlock" the account.
Log On to Go Daddy.
Go to Domain Details Then Settings:
Lock: Set to Off
Authorization Code: Email My Code
Route 53 will need the authorization code to complete the transfer request.
Here are the steps to migrate your internet domain name to AWS route 53 (DNS Manager).
** Be careful where your mail server is hosted, either in the Godaddy mail service, Gmail (gsuite) or in your Cpanel server (VPS/Server).
** To empower your Domain DNS capabilities, you need to transfer the name servers, DNS records and domain name to AWS route53, thats why it's recommended to move to AWS Route 53. You can keep Godaddy to be owner of your yourdomain.com and manage your DNS by Route 53
STEPS:
Go to Godaddy DNS records and understand each of them and note them (Take a screenshot)
Go to AWS route 53, Crete a Public hosted Zone (Create your domain on AWS route 53). Here is a good tutorial about it:
https://www.clickittech.com/aws/migrate-godaddy-to-aws-route53/
Copy your Godaddy DNs records into your Public hosted zone previously created. Remember, each record needs to exist in the new aws zone.
Change your Name Servers to AWS Route 53. What does it means? In order to allow AWS route 53 to manage your domain, DNs records, etc. you need to change your actual Godadaddy Name server (NS) Records to AWS Records.
Go to Godaddy admin Panel and Login
Go to DNS Management
Under Name Servers Click on Change - > Custom - > Change Name Servers
You need to change from NSx.domaincontrol.com to the AWS Name servers.
More info: https://www.clickittech.com/aws/migrate-godaddy-to-aws-route53/
After 4-8 hours your Name Servers will be reflected and propagated around your country, world and networks.
Practically you are done with this.
Additionally, if you need to migrate your website or web app to AWS go to this tutorial, great explanation, see below:
https://www.clickittech.com/aws-migration/transfer-domain-aws-migrate-move-website-aws/
The answer from The Poet above is good for moving everything, but it will also kill your email service with GoDaddy. If you want to keep the email servers running at GoDaddy, you will also need to get your MX email servers and their priority numbers. Mine looked like this...
0 smtp.secureserver.net
10 mailstore1.secureserver.net
Take these over to your Route53 settings, click Create Record Set, choose a type of MX Mail Exchange, and paste these values in (with the number in the front as shown above). Save the record set.
Also PJT was correct; all domain info in Route53 ends with an extra period for some reason specific to AWS, but don't worry about it--it doesn't affect production behavior. When you copy your four from Route53 to paste in GoDaddy's Name Servers, you will need to do them one at a time and trim off the extra period at the end.
If you want to migrate your DNS records to Route 53, you'll need to export them from GoDaddy and recreate them manually in Route 53.
To do this in one automated step, consider a DNS migration tool such as DNSTools.ninja, as outlined here: https://dnstools.ninja/migrate-bind-aws-route53-safely-3-commands/
Be careful with google mx records if you have them.
Why switch to route 53?
AWS Route 53 doesn’t limit you to 64 subdomain.
AWS allows you to host buckets with route 53
It all comes at a 50 cent/month.
AWS Nameservers
Now to answer your question, you need move the name servers to route 53. That means in godaddy name server section should be filled with aws name servers.
See the steps here.
https://metamug.com/article/dns-migrate-godaddy-to-route-53.php
The detailed steps to transfer the domain registrar from GoDaddy to Route 53 is given at https://cloudopian.com/blog/how-to-transfer-domain-registrar-from-godaddy-to-amazon-route-53/
Remember, you first need to transfer your name servers by creating a hosted zone in Route 53 and pointing your godaddy hosted domain to use Route 53's name servers instead of it's own name servers.