I have an AWS instance of a web application written in Python/Django/Java.
My domains are hosted at godaddy and we set the "A record" for www.learn.MyDomain.org to the AWS IP address. I also set the "A record" for www.learn.myOtherDomain.org at the same IP address, and now both work great.
Can I set an unlimited number of "A records" to the same IP address without causing problems?
To be clear - I want to send all domains to the default website.
Why? We would like to share our web app with other orgs, and it would be great if it appeared to their users to be owned by their own org.
Is this problematic? Are there limits?
There should be no problem linking a lot of domain names to the same ip address. You will however have to add the domain names in your webserver config, unless you send all domains to the default website.
This is no problem, shared hosting works on this principle.
Related
I have a site running on ECS in AWS with the DNS being handled by Route53.
There are two network interfaces which I can use the Public IP addresses of to access the site. The problem is Google has indexed this IP addresses as well as the domain name.
How do I "redirect" the IP addresses to the domain name?
There are 2 aspects in your question:
You want your access using IP to resolve to your domain name
Google indexing your site with the wrong URL
For your 1st challenge, there isn't a native way to force browsers from IP back to URLs. You have to handle this in your application or infrastructure. Since you're running in ECS, that could either be a rule in a Load Balancer (e.g. if using Application Load Balancer, a rule that checks if Host-Header doesn't match your domain then redirect to your domain URL), or you could write the logic into your container.
Regarding the #2 problem, that might be because your IP was added to some site in the internet (remember that IPs are re-used in AWS), and as a result Google has the IP in the cache and it's refreshing it. To handle this problem, you might need to review if it's possible using Google's Removals Tool.
I have been looking around the internet and I have come across a few different ways to link my AWS EC2 instance to my domain name. It looks like I could do it using Route 53 but I am not entirely sure on that process. The other way is to map it from google. These seem like the best instructions I have found for that: link a Google Domain to Amazon ec2 server
The question that I can not seem to find is what about my email address. I pay google so that I can have some email addresses name#mydomain.com. Now these work fine and I have had them up and running for months. But now I want to have my website (it is a web app) point to it. Because currently when you go to mydomain.com it says This site can’t be reached mydomain.com’s server IP address could not be found.
Some help here on how to do this would be great. I am afraid that I am going to set this up incorrectly and then lose access to my gmail account which I cannot have happen.
Your domain's email is configured via MX DNS records. You would point your domain to your EC2 instance by adding A or CNAME DNS records. The two configurations are completely separate. You will not break your current email setup by adding an A or CNAME record that points to the EC2 instance. You simply need to add that record in your DNS settings, wherever your DNS is currently hosted. You don't need to make any changes in your Gmail account configuration, and you don't really need to use Route53 either (although it does add some nice features). You had to configure the MX records somewhere at some point, to setup your G-Suite account for your domain. You just need to go into that same DNS configuration (most likely still hosted at the company where you initially purchased the domain name) and add an additional record.
I have a specific DNS problem for my website - I can access my website using its static ip address but not its domain name. Here's a description of my situation:
I registered a website name, say, "xxx.com", at GoDaddy.com, but the web app is hosted on a AWS lightsail Ubuntu instance with a static ip;
In the "DNS Management" page of this same on GoDaddy.com, I specified custom name servers as those provided by AWS
On AWS Lightsail, I then created an "A" DNS record that maps "xxx.com" to the ubuntu instance's static ip: "A" - "xxx.com" -> "x.x.x.x"
I was able to reach my website using "xxx.com" last night, but after rebooting the Ubuntu instance this morning, the domain name is unreachable while the website can still be accessed using its ip address
I have 2 questions -
How would AWS' name servers know that I am the rightful owner of this purchased domain name "xxx.com", by allowing me to map "xxx.com" to a certain ip address?
Did I miss something during the process above that made my website unreachable today using "xxx.com"? Why was it working yesterday but not today??
Any thoughts would be appreciated. Thanks in advance!
I can now partially answer my own question #2, and the answer is DNS propagation.
When DNS changes are made, it might take up to 24 hours for the DNS changes to take effect across the internet. Both name servers and one's local DNS cache will need to refresh first before receiving newly changed DNS records.
I know this should be a pretty easy thing to do, but I'm having trouble.
Say I bought a domain name from 123-reg.co.uk "example12345.com". And I have a website hosted on AWS called something like http://lowcost-env.blahblahblah.us-west-2.elasticbeanstalk.com/.
I have read the following blog: https://www.thesitewizard.com/domain/point-domain-name-website.shtml and followed the steps, but still have 2 issues/questions:
1) I have configured "web forwarding" on 123-reg.com to forward requests to example.com to my convoluted AWS address, but when I type in example12345.com to a browser, it just says the DNS can't find that domain name. I set this up weeks ago, and did manage to see it work a couple of times, but weeks later it doesn't work anymore.
2) On the occasions I did see the web forwarding working, I notice that the browser displays the convoluted AWS address after the redirect happens. Is there a way to configure it so that users type in example12345.com into the browser, and then it's that address that is always displayed in the browser address bar whilst they are browsing around my website? Surely I need more than just web forwarding and a redirect?
Thanks!
You can use Route53 for pointing domain name to the AWS endpoint. Check the step 5 of this documentation :
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html
In Route53 you can point your domain to alias whereas in other DNS you need to specify IP address/CNAME. As in your case you are using endpoint from AWS you can map it to your domain.
You will also need to modify the nameservers to point to AWS.
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.