I am currently hosting my website on amazon elasticbeanstalk and I purchased a domain from namecheap.com then I followed the steps here. On AWS route 53 I created a hosted zone and an Alias record then on my namecheap account I selected custom DNS as my DNS servers and inputted the values I got from AWS route 53. Now after 24 hours I can access my website from www.domain.com but not from domain.com. I opened up a terminal and I pinged domain.com it says "unknown host domain.com" but pinging www.domain.com works. I don't know why.
For this you need to create an another Record Set with empty name i.e. leave the name field blank and provide the value same as www.yourdomain.com (your IP address).
Please do note that both the values on WWW and non-www should be the same.
Hope this would solve your problem!
Related
I'm using AWS route53 as my DNS server.
I have an A Record pointing a webserver for the sub-domain www and CNAME for the root "#" subdomain which points to the www sub-domain, so when I try to get mydomain.com or www.mydomain.com I should get the same result and It works fine in Godaddy DNS and NameCheap DNS servers but in route53 the www record works fine but the # doesn't work and I have to type the full www.mydomain.com for me to get the site back.
In this situation, you don't need to include the # symbol when creating record sets for your domain.
According to the docs,
If you're creating a record that has the same name as the hosted zone, don't enter a value (for example, an # symbol) in the Name field.
I've registered my domain on Route53, deleted the default hosted zone, and set the name servers to the ones provided by Lightsail. I've also set up a hosted zone in Lightsail with two subdomains: # and www. Both are A records that point to the static IP of my Lightsail instance.
The top-level domain works fine, but the www is giving an "IP address not found" error on my browser. What might be going wrong?
Turns out it just takes a while for the DNS to update.
You can use https://www.whatsmydns.net/ to check if DNS is updated.
I'm pretty new to DNS and this is the first time trying to connect a domain name to an IP, so I'm not sure what I'm missing here. I tried connecting both the www and non www NS records to the Lightsail name servers but only the non www option seems to be working. When I try to hit www.[domain].com, I get unresolved hostname. I also added an A record in each hosted zone that points directly to the IP and I'm not sure if they actually did anything, but I can only access the site from the IP or from http://[domain].com. I appreciate any help you guys can give me, hoping its something small.
Here is an album containing my hosted zone and each zone's settings
I think you don't need to use two separate hosted zone for www and the apex domain (non-www). You can have a single hosted zone and create resource record set for www and the apex domain using CNAME or Alias records. Since you already have an A-record for example.com, in the same hosted zone you can create a CNAME record for www.example.com and point it to example.com
Regardless, for the domain not found, it could be due to the TTL.
Hope this helps.
More information:
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#CNAMEFormat
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-basic.html#rrsets-values-basic-ttl
I have a hosted zone for my www.example.com domain (Route53), and I have a subdomain.example.com subdomain. I've bought another domain www.domain.com and I want my subdomain.example.com to point to www.domain.com. Is there any way to do that without adding another hosted zone for www.domain.com?
Just go to hosted zone www.example.com ; create a CNAME record for subdomain.example.com and put value as www.domain.com
From my understanding, you currently have an AWS Route 53 hosted zone named 'www.example.com' and a subdomain under this hosted zone with the name of 'subdomain.example.com.' You have recently purchased another domain (www.domain.com) and want to have your subdomain (subdomain.example.com) point to 'www.domain.com.'
Depending on where you purchased the 'www.domain.com' will result in two different solutions.
Solution #1: You purchased 'www.domain.com' from AWS
Make sure you have a hosted zone created for this domain [1].
Create an "A Record" using the "Create Resource Record Set" button when inside the 'www.domain.com' hosted zone. You can leave this as 'www.domain.com' as the name, and for the alias/value of this A Record, you will point it to the EC2 Instance that is running your site [2]. (If you are pointing your web site traffic to go through and ELB, S3 bucket, etc.. then you can follow this link below [3])
Go to the hosted zone for 'www.example.com' and make sure your subdomain (subdomain.example.com) is using a CNAME record. If not, then you will need to delete this resource record and add a new one with the same name and for the value, you will put in 'www.domain.com'.
Once this is complete, then you can verify that this is working as intended by placing 'subdomain.example.com' in your browser and seeing if it redirects to 'www.domain.com'. You can also run a dig [1] curl command to see if you are able to pull up the site and resource record information.
Solution #2: You purchased 'www.domain.com' from somewhere else that was not AWS
Make sure you have your hosted zone has the subdomains you want to use (such as 'www.example.com) to use the CNAME of 'www.domain.com'.
Update your NS record for the parent domain 'www.domain.com' to use the NS records that are for your Route 53 hosted zone 'www.example.com' (there will be 4 of them) [5].
If you run into any issues with what was stated here, then please let us know where you bought www.domain.com and what you are currently seeing as the issue with any results you can provide.
[1] http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingHostedZone.html
[2] http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html
[3] http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-aws-resources.html
[4] https://www.digwebinterface.com
[5] http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html#UpdateDNSParentDomain
While #Deepak's answer works, you'll probably need to create a hosted zone for www.domain.com
One solution is to go to the DNS settings of your domain from your domain provider (if it's available), and add A Name records for it.
I have a domain name lets says it is domain.com. I have created an EC2 instance with a LEMP stack to host the website. The domain name is registered at godaddy. I have created a hosted zone and also created a record set with my elastic IP. The thing is website is accessible if I type domain.com, but when I add www to it doesn't work. If url is www.domain.com it gives an error. I am unable to find a way to do this. I would be highly grateful if anyone can help me in solving this problem.
when you moved the domain to a different server,the dns will need to be updated to the new value. this is a caching issue, wait a few hours for the cache to expire and then your new ip will be retrieved.