I have deployed a simple html website running on NGINX on a AWS EC2 server. I intend to host 2-3 static websites on this server. For the time being, I have configured only 1 server block and hosted the website.
When I type the ip address/public dns name of the server in the browser, I can see my website. My domain name is registered with another service provider.
How should I update the Nameserver records in my domain registrar account? Should I just update the public ip address in the name server field or should I update the public dns name?
My domain registrar is asking for two name server details as compulsory fields. If I update the same public ip address twice, its not allowing me to save.
Please advise. I want to know the nameserver details for my EC2 based website. My website is not hosted on Amazon Route53.
Do not update your nameserver records, these are records you would use to configure where your DNS records should be resolved.
Instead you need to update/create an A record that points from the domain to your new host IP.
Related
I have deployed a django based website on my AWS lightsail instance. the web address has a port 8000 (:8000). I own a domain on (host =fatcow.com). I have created a hosted zone on AWS and pasted the ns values to my provider(factor)'s Nameservers values. In the amazon route53, I have created a new record with a simple redirect A ipv4 and entered the resolver IP address value - my web address with port value. it doesn't work.
Also, I have read that the redirect will not work for its with port numbers. I have tried redirecting my domain to the static ip, then created another hosted zone record trying to redirect the static ip to the ip+port value - error pops up saying it is not a valid address.
I currently use the development server provided by django as it is a personal website and currently it will not have a lot of traffic - portfolio website.
Also, on my fatcow.com domain settings, the Nameservers are updated and in the whois values, new Nameservers are seen. I have only added the 4 NS values. AWS also created SOA ip values but I was not able to add them to the domain (Inputs were not taken by fatcow ).
In the NSLookup website, I can see NS values and SOA values which are on the AWS hosted zone but A records show none.
Edit: sorry for the confusion. my domain is www.chandradhar.com. I'm not a web dev but I'm trying to deploy a django based portfolio website. I have added Amazon Lightsail DNS nameservers to my domain (host=fatcow.com). the web address is :8000 port. Without the port number, the website isn't loading at all. Only with the port number along the static IP, the website loads. 'A' record isn't taking the port number. I did add a SRV record with the port number(in AWS route 53) but still doesn't work. when checked from the website nslookup.io, the nameservers are updated correctly
Not reproduceable.
> host fatcow.com
fatcow.com has address 65.254.254.33
fatcow.com mail is handled by 10 mail.fatcow.com.
Most probably your changes in DNS have already propagated.
Steps to successfully deploy one or more websites on lightsail AWS when the domain is on another website like godaddy/fatcow.
Create a dns zone in the networking section of the lightsail instance.
Copy the name servers from the dns zone and paste it in the name servers section of the domain provider (fatcow/godaddy) - it might take upto a day for the values to get updated - i used nslookup.io to see if my nameservers were updated.
Create 'A' records and SRV records pointing to the static ip of the lightsail instance.
Install Nginx
Create a simple script with the (name of the website).conf in the conf.d folder/available sites folder
Add the following script:
server
{
listen 80;
server_name domainname.com;
location / { proxy_pass http://ipAdd:PortNum;
}
}
Repeat the same code block with different domains and redirect ports. I guess we can also use 301 redirect to achieve the same.
This might or might not be the proper way of achieving what I required but it'll work.
info: i have two hosting server one is on skyhost.com and the other is on AWS Lightsail. skyhost is a cpanel hosting where i register my domain name and my emails accounts. My website is hosted on AWS Lightsail with the domain. my website is contain the domain which is register on skyhost. The website is working fine because AWS DNS are propagated with domain which is register on skyhost.
Issue: But the email info#mycompany.com are not working (sending or receiving). I am not able to login the accounts since i host my website on AWS because i don't understand how can i add DNS records in Lightsail AWS of skyhost for mail exchange or something else...
example: (65.91.30.99) that is the ip of cpnel skyhost. staticip-1 that is a AWS server ip
To keep it simple, the MX records do not point to IPs.
You will need to set the sub-domain to the naked domain example.com or "#" in some cases. (I have not used the light sail DNS console before)
But you then set up the "Maps to" as mail.example.com and then create an A record for mail.example.com to point to 65.91.30.99
This is how basic DNS routing works for email.
More info here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry
I am trying to verify my website on google console and it is asking me to add the verification code into dns configurations. I purchased the domain from godaddy and hosting my website on aws server that's why godaddy's dns configuration has name servers provided by aws.
Now when I am trying edit the records of my domain in Godaddy.
It says:
We can't display your DNS information because your nameservers aren't managed by us.
Which is because I am not using Godaddy's nameservers.
I wanted to know which is the right place to add the googe verifcation code is it godaddy or aws?
If it is AWS where should I add the record.
Open AWS Route53
Create Hosted Zone if you are not created.
If already created then create record set
Select TXT record and add your value.
I have a basic Django website running on an AWS EC2 instance. Command I use to run server:
python3 manage.py runserver 0.0.0.0:8000
Website is accessible when I used the public IP of the EC2 instance in the browser.
EC2 Security group settings
Next step I tried was to set up DNS using AWS Route53. Created a hosted domain as shown here -
Hosted Domain
I have added record sets for www.mysite.com. and mysite.com.
My domain is registered with namecheap.com and I have added the 4 name servers shown in my hosted domain to it in the custom DNS section under name servers.
The state of my domain on whatsmydns good. I have created a health check under route53 and it shows red. The website is not accessible when I type in www.mysite.com in the browser.
I tried pinging the domain. It times out but maps to the correct public IP.
What am I missing here? Please advise.
I am new in the Amazon EC2 world, I just created an app, that is located URL like this:
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
This is generated URL by Amazon EC2.
Now I would need to use my own domain name, so when I would access www.my-domain-name.com, I would like to see the content from
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
I bought the domain name on Godaddy.
Is there any way to do this in Amazon AWS dashboard or do I need to set it up in Godaddy system?
Thanks
I am answering on a more general level because I stumbled upon this thread when setting my custom domain.
In Amazon I created an instance and associated an IP to that instance. You were able to access it by typing in the amazon url
I actually used Media Temple not GoDaddy, but it will be similar. I went to the zone file and added that public url to the www
And as you can see, here is my blog actually working on the custom domain.
I set the wildcard because that way, no matter what someone types, if it is not set, then they will still see the site.
EDIT
For the root URL you should be entering your elastic IP and setting that as an A record.
First you need to set an ElasticIP for associated to that instance.
Then point the DNS entry of "www" for "my-domain-name.com" to the IP assigned in the step above.
Where you manage your DNS is another thing, can be in GoDaddy or in AWS Route53. You must adjust the delegation DNS in the "my-domain-name.com" register. Ex: your domain can be registered with GoDaddy but its delegation DNS point to Route53 so you can manage the domain from your AWS Console.
In order to setup DNS mapping you can map the existing IP 54.123.45.678 to ex: www.my-domain-name.com.
However, as you are running tomcat which is running at 8080 you need to forward the the request to the tomcat using Apache. So that you can visit www.my-domain-name.com without port 8080. If you are using linux box install Apache, apache-modjk and then configure sites.