I have purchased my domain(artykart.com) from GoDaddy.I want to add a subdomain to the existing domain named india.artykart.com. I want to direct visitors from India to the subdomain (india.artykart.com) when they type in artykart.com. So basically I want to add a region-specific subdomain. My hosting is on google cloud platform.
DNS servers do NOT support geolocation-based redirects to a subdomain.
This means that your website artykart.com will need to use a Geolocation service. Then redirect the user to india.artykart.com.
You can have webservers running for the same domain name in different locations in the world. There are DNS servers such as AWS Route 53 which offer geolocation but for a domain, not a redirect to another domain/subdomain. With Route 53 you can have a website in major world locations and use Route 53 to send traffic to a webserver serving that region.
Note: Geolocation is not a reliable service. This is a best-case guess by the geolocation service. An IP address location for major companies such as Google is the company's registered mail address and not by the data center that the IP is used.
Neither GoDaddy DNS nor Google Cloud DNS offers these services.
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)
In my application, I'm giving a subdomain (like user.domain.com) to each account. So, I'm planning to use AWS Route 53 for routing subdomains to my application. Is there any maximum limit of subdomains in Amazon Route 53.
Thanks in advance!
I'm giving a subdomain (like user.domain.com) to each account
You should revise your application design what If you users reached to million? and what if you want to migrate your DNS in future also subdomain maximum limit varies from service provider to service provider.
So generalize solution cloud be like all subdomain will point to a single endpoint (Load balancer) and your core backend will check DNS and then load custom response base on the domain, normally login page for which you can save custom logo etc against domain name and load these resources base on domain.
High-level architecture
So same case for a big cloud service provider, for example, slack, which provides subdomain for each user but do we think that slack manages route53 record for each users?
how-slack-works
Or you can simply do nslookup, for thousand domain you will get the same backend IP.
slacker:~$ nslookup acmeinc.slack.com
Name: acmeinc.slack.com
Address: 13.228.49.204
slacker:~$ nslookup www.slack.com
Name: www.slack.com
Address: 13.228.49.204
The Route53 limits and quotas are listed here.
The limits are not expressed directly in number of subdomains, but rather in number of records and hosted zones, among other things.
Therefore, there is 10,000 records per hosted zone, but it can be increased. Also you can have 500 hosted zones per account.
This might be relevant or not depending on your use case, but if you expect a large number of users and want to assign a custom subdomain per user, then the limit of 10,000 is probably not sufficient for you.
Your other option is to create a CNAME record with a wildcard subdomain, something like *.domain.com, and point the record to your application, this is now supported by AWS Route 53 and will support all possible subdomains.
The drawback is that subdomains that are not registered will also be directed to your application (like random-str.domain.com), so you'll need to do your validation outside of Route 53. Maybe call an API to validate from your frontend app
I have a situation where we need to run a website at example.com on webflow. Currently we have a webapp running at app.example.com, but for SEO purposes we would like to move it to example.com/app. We're using AWS Route 53 as a DNS provider.
Is this possible?
That is not possible with Route53, since that is a Domain Name Service (DNS), not a path routing service. This is one of the features of CloudFront though.
I have created a Route 53 hosted zone which contains a SOA, an NS record and a A record.
The A record points to the web instance I have hosted on AWS.
On the registrar what do I need to use to get the domain to use Amazon Route 53, is it just Nameservers? Or do I need an A record or a CNAME?
Which Nameservers should I use the SO or the NS record?
Thanks
Just name server entries, here is AWS documentation on Migrating DNS Service for an Existing Domain to Amazon Route 53.
Which name servers? Here are steps on how/where to get them and add them in 3rd party server.
Step 5: Update Your Registrar's Name Servers
Step2: In the Amazon Route 53 console, get the name servers for your Amazon
Route 53 hosted zone:
Sign in to the AWS Management Console and open the Amazon Route 53
console at https://console.aws.amazon.com/route53/.
In the navigation pane, click Hosted Zones.
On the Hosted Zones page, choose the radio button (not the name) for
the hosted zone.
In the right pane, make note of the four servers listed for Name
Servers.
Alternatively, you can use the GetHostedZone action. For more
information, see GetHostedZone in the Amazon Route 53 API Reference.
Step3: Using the method provided by the registrar for the domain, replace the
name servers in the registrar's NS records with the four Amazon Route
53 name servers that you got in step 2.
Note Some registrars only allow you to specify name servers using IP
addresses; they don't allow you to specify fully qualified domain
names. If your registrar requires using IP addresses, you can get the
IP addresses for your name servers using the dig utility (for Mac,
Unix, or Linux) or the nslookup utility (for Windows). We rarely
change the IP addresses of name servers; if we need to change IP
addresses, we'll notify you in advance.
You are still using your registrar's Name Server.
Change it to AWS Route53 name server.
Just adding the name servers to the registrar's website, brought my domain up and running.
I have my site set up running WordPress on EC2, with the domain set up with Route 53 and CloudFront.
Currently, all non-Australian visitors are set up to be blocked from the site with CloudFront restriction.
I need to set it up so that non-Australian visitors get directed to the .com domain.
Any insight on how to achieve this in AWS?
Amazon Route 53 can provide geolocation routing where DNS names are resolved differently based upon the location of the DNS request.
For example, you can configure Route 53 so that a DNS request coming from Australia is sent to a CloudFront distribution, while other ('default') requests are sent to a different location (eg a CNAME record pointing to a different .com domain). CloudFront can then do an extra level of enforcement to prevent users from bypassing the DNS location check (as you currently have it configured).
Thus, it is actually Amazon Route 53 that will decide where to send the traffic, prior to hitting Amazon CloudFront.