Is it possible to point a subdomain at a droplet, without having to move domain to digitalocean? - digital-ocean

I have a domain, example.com, and I want to point a subdomain, test.example.com, at one of my droplets, WITHOUT having to move the domain to digital oceans nameservers. is this possible and how?

Yeah, it's very much possible. Go to your DNS manager, and create an A record for your subdomain pointing to your DigitalOcean droplet's public IP.
For example, to point your subdomain test to your droplet with IP 13.13.13.13, set the following A record.
Type Name IPv4 Address
---- ---- ------------
A test 13.13.13.13

Related

How to configure a static website (only http) on GCP without a load balancer?

I have a very simple website that I want to host in a GCP bucket. I want it to only use http (not https) and don't want to add a load balancer and most examples of static GCP websites show adding a load balancer.
The only example I could find without a load balancer shows pointing a CNAME record to c.storage.googleapis.com which would connect to the bucket that's named www.mysite.com.
So far, that works fine except that it doesn't include access to the domain without the www subdomain attached (mysite.com). And, I can't attach an ALIAS record that just points mysite.com to www.mysite.com because Google Cloud DNS doesn't have ALIAS records.
It seems like there would be a pretty simple solution but I'm stumped.
By design you cannot create a CNAME record in a "root" domain level. It has to point to a subdomain. Unless you're pointing it to other domain.
By design buckets are served using CNAME record such as www.mysite.com pointing to c.storage.googleapis.com.
So you're forced to use www prefix or other subdomains.
There's a mention in the documentation of a possibility to serve bucket using A record.
You can use a bucket name in a DNS record as part of a CNAME or A redirect which gave me an idea.
But it's a "brittle and hardwired" solution
You need to create bucket named "mysite.com" with the copy of your site.
Then you go to your managed zone and edit A record to point to the IP of c.storage.googleapis.com which is 74.125.143.128 (at least at the moment I was writing this). Next you change your CNAME record www.mysite.com to point to mysite.com to redirect www to non www.
Then wait until the changes propagate and you're set :) I tested it and it works. I don't like to wait so I changed TTL's of all records involved to 1 minute.
Then you'd ask yourself why I wrote it's "brittle and hardwired" ? It will work until someone will change the IP of c.storage.googleapis.com.
Maybe there is some other way to set up DNS records to point to c.storage.googleapis.com instead of IP but I wasn't able to figure this out.
If you don't change your CNAME record and leave it pointing to
c.storage.googleapis.com then you can have to sites (identical or not it's up to you). One available with www - other without.

set aws route53 as a cname target

i have bought a domain, for example examp.com, by hoster x.
A little bit later i have realized that aws is better for me.
I have register a hosted zone with my domain and change the NS-records by hoster x to the NS-Server from my hosted zone.
It works perfect!
But now i would like to whitelabeling my website.
For example a client have a domain abc.de and he would like to access my website with a subdomain sub.abc.de.
My idea was to create a CNAME-Record on sub.abc.de that points to examp.com.
But that not work (Not Found - The requested URL was not found on this server.).
I have read that the target server gotta know from the CNAME-Record that points to him. But i don't know how can i do that. In my hosted zone i can only register subdomains for examp.com for a ALIAS or so but not for another domain.
Can anybody help me?
If they control the domain of abc.de they are able to create the record their side for sub.abc.de as a CNAME record with the value set as your domain (examp.com).
They should never be attempting to CNAME to your NS server records, these are records for where your DNS records can be retrieved from.
Other than you providing the CNAME value of examp.com to them it is upto them to configure their DNS to target your hostname.

Lightsail instance works when you hit http://[domain].com, but not www.[domain].com, using Route 53 as DNS

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

Is it possible to have GoDaddy host my domain name but use AWS to host my website?

I'm a little confused on what Aws is instructing me to do. They are telling me to transfer the name to Route 53 first which cost 12 bucks. Is there a way to not use Route 53 and still host my website using Aws?
Yes,
you can have your domain at any registrar and have your DNS zone hosted anywhere. Just modify DNS records to point to your AWS resources like ELB, EC2 or S3.
Amazon doesn't force you to use Route53.
Yes, this is pretty common.
In Route53, create a new zone for your domain. When you do this, you'll get the NS and SOA records created by default. There will be 4 NS entries. Add any other records you need.
Then, when you're ready to switcy, go to the godaddy DNS settings, and change the NS and SOA records to the values in the Route53 zone. By default, I think godaddy only shows 2 NS records, but you can add all 4.
AWS is boss, if you are trying to capitalize on the ACM and get a free SSL you do need to use Route53 to make it happen. Try to test a PTR - Pointer record to your ip address within the DNS to make everything working
Third Party Domain Registrar/DNS
Create a hosted zone through Route53 and erase all DNS/Nameservers
from your domain.
Add the four nameservers to your domain
registrar's DNS should have a mix of .org .com .net and .co.uk or
something similar. All four need to be insterted.
After creating your instance and having your domain pointed to it you will
need point the ip address to Route 53 with an A record. Keep it that
way for now
Generate a certificate with ACM as described above
Create an ELB as described above as well Now with the DNS first make
a *.domain.com A record to point to your dualstack.
Then delete the original A record that pointed to your ip address
Next make sure you point the A record now to your
dualstack.loadbalancer for your regular domain.com
Next, here was the crucial part for me, make a PTR - Pointer record
to your ip address with domain.com as the name
Viola free certificate will work with Wordpress
Oh, and if your design looks funky or any issues getting the green bar then it's something embeded so start with this plugin, make sure "HTTP_X_FORWARDED_PROTO (e.g. load balancer, reverse proxy, NginX)" is enabled and then move on from there with your typical ssl auditing. https://wordpress.org/plugins/ssl-insecure-content-fixer/11
A lot of cool info for AWS + Wordpress via bitnami and more details on the SSL here: https://community.bitnami.com/t/connecting-amazon-ssl-via-load-balancer-to-bitnami-aws-marketplace-instance/41460/29
Let me know if you have trouble getting started on actually launching the instance and getting wordpress up first. The domain pointing and ssl is one of the last steps.

route53 naked domain not reaching amazon elastic load balancer

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.