I am building an application, for that I am using serverless and netlify. so for the api which is using serverless I want to use sub-domain api.example.com and for dashboard I want to use example.com via netlify,
I purchase the domain via Route53, so that I can use the serverless, but to use netlify I update the domain name server to netlify name server , and I lost the sub-domain in serverless.
Could it be possible to have two different NS for domain and sub-domain ?
It is possible to to have different name servers for domain and subdomain. You have got to understand the resolution process though.
DNS query goes like this .com -> example.com -> api.example.com
As I understood how you have currently configured your DNS:
example.com -> Delegates to Netlify name servers.
Any further subdomains (like api.example.com) will then further be looked into Netlify NS records. If you want to go back to your AWS account again, for that you need to have further delagation for "api.example.com" in your Netlify NS's pointing back again to your hosted zone in AWS.
Why don't you just use one provider and then configure the A record and subdomains from the same place?
You can have multiple name servers (for redundancy) but I don't think you want to point a domain and multiple providers. One pointed at GoDaddy and one pointed at Route 53. I'm not sure that would work. Even if it could work, you probably won't want to do that.
Related
I have an application that I want to launch on AWS. This application must have a domain that would allow me to create hundreds of thousands of subdomains.
Now, Hostgator allows you to purchase a domain that you can create an unlimited number of subdomains.
Is it possible for me to transfer my subdomains created on Hostgator to AWS?
Jordanm makes a few good points in the comments.
We need to distinguish between the registrar and the DNS provider that hosts the domain.
The registrar allows you to buy a domain, which is then registered to you and allows you to use it.
In order to use that domain, you need a name server (in practice it's more than one) that can respond to requests for that domain.
You can tell the registrar what the name servers for your domain are and for this you set the NS (short for - you guessed it - name server) records for your domain to point to your name server.
This name server can then create as many subdomains as it likes, because it will be the authoritative source for others to find these subdomains.
Many registrars also host a name server for you and some limit the number of subdomains.
If that's the case for your registrar, you can just use another DNS service and tell your registrar that the other DNS service is now responsible for your domain.
In the case of AWS, you would create a public hosted zone for your domain in Route 53.
It will then tell you, which NS records to configure with your registrar.
When you've done that, you can manage your domain and subdomain in Route53.
You can also directly buy a domain in Route 53, because AWS acts as a registrar as well.
(A little bit simplified, but that's basically the process)
I am trying to host my static website using S3. I have a domain that I bought outside of AWS. The URL for my bucker http://my-website.com.s3-website-us-east-1.amazonaws.com. My domain name is my-website.com. I have tried everything but I cannot wrap my head around how I should be configuring CNAME so that my URL does not look messed up. I tried forwarding but that does not work for obvious reasons.
Please suggest solutions.
It depends on what your DNS provider is
You're using Route53 then you need to go to the Hosted Zone for my-website.com and add a A record for my-website.com that points to the bucket. You must set Alias to true for this to work.
If you're using a different DNS provider you can't route Apex domain (my-wesite.com, without www, or another subdomain in front). You'll be able to add a CNAME record for a subdomain that points to the S3 web endpoint.
My website's domains are currently managed by a domain provider called mijndomein.nl. The aws hosted services are connected simply by subdomains using elastic-IPs. Because of some infrastructural changes, I'd like to start using Route53 for certain subdomains. As there are several other things managed by the domain provider and changing the whole infrastructure all at once seems dangerous, I'd like to manage only some subdomains in Route53.
I found this video, which shows how to manage the whole site in Route53 by adding the Route53 name servers for the custom domain provider.
My first question is if it's possible to keep the already existing subdomains at my domain provider and manage only specific subdomains in Route53? If I add the aws nameservers will my domain provider continue to route to elastic-IPs?
1) Yes
2) Yes, but be careful here: you don't want to change name server for your (root) domain name like they did at 2:58 of that video. Instead you have to go to DNS service provider's console (DNS service provider may or may not be the same place where you registered your domain - from mijndomein.nl web site it looks like they only offer domain regitration but I may be wrong) - that is the same console where you point your usual hostnames (www.example.com for example) to IP addresses, but instead of A record you will create a NS record(s) that will delegate your newsubdomain's name resolution to appropriate AWS name servers.
newsubdomain.example.com NS ns-xxx.awsdns-yy.com
newsubdomain.example.com NS ns-aaa.awsdns-zz.org
newsubdomain.example.com NS ns-bbb.awsdns-qq.net
newsubdomain.example.com NS ns-ccc.awsdns-pp.co.uk
(example)
Right now our domain name and DNS are still hosted by our old provider until we make the full switch to Amazon AWS.
We run a lot of subdomains i.e. vendor.mydomain.com which were previously setup as websites on our old host. I deleted the subdomain on the oldhost and replaced it with a cname on the mydomain.com level for vendor to point to AWS, all is working well.
Now I need to add some TXT records for mailgun to verify my domain and I'm not sure where / how to do it.
Mailgun is looking for and expecting a CNAME record email.vendor.mydomain.com. I tried creating this on mydomain.com as I did for the vendor CNAME, it lets me create it but it never seems to be detected by mailgun.
I figure I could go with the configuration where I create a subdomain on my original host, but then the nameserver of my old host takes over for vendor.mydomain.com. In this scenario I'm all good with the Mailgun CNAME's etc, but I don't know how to effectively point to AWS for vendor.mydomain.com as the CNAME on the domain level no longer works.
Thoughts / suggestions welcome!
If, on the authoritative server for example.com, you have a CNAME record for subdomain.example.com, no other records on that same server can be valid for, or under, that subdomain, because the CNAME effectively blocks everything at or below itself by saying "stop, look elsewhere... specifically, look here."
Create a hosted zone in Route 53 for example.com. Note the 4 awsdns name servers it assigns to the hosted zone.
For each subdomain you need on Amazon, create 4 NS records for each subdomain on the example.com authoritative servers.
vendor NS ns-xxxx.awsdns-yy.com.
vendor NS ns-xxxx.awsdns-yy.net.
...etc., for the .org and .co.uk domains.
This delegates all lookups for that subdomain (e.g. "vendor") and all of its subdomains to the Route 53 servers, while leaving your existing servers authoritative for the records it still contains.
Then you can create records in the hosted zone in Route 53, including alias and CNAMEs as needed.
I`m currently using route53 for 2 domains that points to the same website.
Lets assume they are www.example.com and www.example.com.xx, I`ve created 2 hosted zones and maintained the configuration created by default. So, initially I had entries for NS an SOA in each hosted zone.
My EC2 instances are behind Elastic Load Balancer, so my first step was to create aliases for both domains and it naked domains, having the following scenario:
www.example.com
name type value
example.com. NS Generated value
example.com. SOA Generated value
example.com. A ALIAS to my ELB
*.example.com. A ALIAS to my ELB
www.example.com. A ALIAS to my ELB
www.example.com.xx
name type value
example.com.xx. NS Generated value
example.com.xx. SOA Generated value
example.com.xx. A ALIAS to my ELB
*.example.com.xx. A ALIAS to my ELB
www.example.com.xx. A ALIAS to my ELB
Both domains are pointing to the same ELB, where Apache configs to example.com. Then, my Django app subdomain middleware redirects to example.com(301) if request.get_host contains the .com.xx substring.
It is working perfect for both www.example.com and example.com as for www.example.com.xx, my problem is with example.com.br that never reaches my server.
I`ve already tried to make a PTR entry example.com.br -> www.example.com.br, but it was not the solution.
Anyone can point where my DNS config for this naked domain is failing?
Thank you
Firstly lets worry about example.com.br. [www.example.com.br we will take later]
Did you made changes on ur Domain registrar; so as to give DNS servers as that of Amazon ? What is the output you are getting when u do :
nslookup example.com.br
also what is the output for
ping example.com.br
Yesterday night I was able to redirect my naked domain properly, it was a bug in my brazilian provider that was dealing with the registrar. Actually, I just gave them back the control of the DNS table and took it away (returning it to route53).
Anyway, they were being used as a bridge to the registrar since I was migrating. Now I`m dealing directly with registro.br and the problem is gone.