I have 3 different websites hosted on the same server, but with different domain registrars. I realize I could use the server's nameservers for all 3 domains, but I was wondering if it would be possible to use the standard registrar's nameservers, but change the DNS' A record to point at my server's IP address.
Is there any advantage/disadvantage to doing it this way?
Thanks!
there is two ways to point domain to server
domainname.com to A Record
Domainname.com to nameservers (ns1.domainname.com & ns2.domainname.com)
if you update A record with registrar for the domain, you can manage DNS with Registrar
but if you update nameserver for the domain you have to manage dns with your own server
this is the main differents
Related
Webhosting sites like wordpress or godaddy have several subdomains like https://hello.wordpress.com/ . Does each of them have a unique IP-address (v4 or v6)? If not, how does routing work?
I just checked and the output from host hello.wordpress.com equals host www.wordpress.com. So I assume that...
www.wordpress.com resolves to e.g. 192.0.78.12/ and
hello.wordpress.com resolves to e.g. 192.0.78.12/hello or similar.
Is this assumption correct?
You have an A record for each subdomain, so you can point it to the same IP address or a different one.
The routing of the sites is just done with the server configuration, I can't speak for GoDaddy or WordPress as I don't know what stack they are using.
I believe a standard Apache server would have the main domain in /public_html and the subdomain in a /sub.domain.com folder.
what is the difference between custom DNS and FQDN, i got this question in my mind when i was using certificate generation for our servers. what is the difference it makes if we use FQDN or custom DNS for generating CSR.
Let's say that your server has the hostname 'anne'.
And lets say that you bought a domain called 'hathaway.com'.
Then yout FQDN is 'anne.hathaway.com'.
The FQDN is the combination of the hostname of the server + the domain.
If you generate a cert for your FQDN it will not reach all the subdomains of your domain.
How to setup AWS cloudfront with lightsail for WordPress? (on a subdomain)
I'm using Route 53 for all DNS management. I'm using a static IP from
lightsail, 3.122.2.187
Route 53 has an A record for service.openinfo.nl using an ALIAS to the cloudfront domain name.
Route 53 has an A record for wordpress.openinfo.nl pointing to the
lightsail static IP 3.122.2.187
Cloudfront has an origin domain name of wordpress.openinfo.nl
Cloudfront Origin Protocol Policy is HTTP Only.
Cloudfront Alternate Domain Names is service.openinfo.nl
Cloudfront SSL Certificate is the one issued by Route53 for *.openinfo.nl
Cloudfront Viewer Protocol Policy is Redirect HTTP to HTTPS.
This solution does not work:
The cloudfront distribution service.openinfo.nl does resolve the lightsail server but over http, it does not use the certificate I attached... Should I use redirect http to https?
Also, if I click 'login' it redirects to wordpress.openinfo.nl/wp-login.php i.e. the DNS that I assigned for the purpose of orgin domain name to cloudfront. The WordPress "WP_SITEURL" and "WP_HOME" settings somehow automatically reflect the DNS wordpress.openinfo.nl.
And also, the DNS name wordpress.openinfo.nl resolves the lightsail server (which I don't want because I want all trafic to the wordpress server to go via service.openinfo.nl). How to avoid this?
Background and what I tried:
My lightsail (WordPress) server does not show up in the "Origin Domain Name" dropdown list when creating a new distribution. So what should I do? The only AWS description on this topic that I can find is not clear on that to me.
Using the servers fixed IP address as "Origin Domain Name" in cloudfront is not allowed. So I created a DNS record in Route 53 (wordpress.openinfo.nl) to point to the static IP of my lightsail server. And I added this DNS record as "Origin Domain Name" in cloudfront (also including a https certificate *.openinfo.nl). And I selected the cloudfront distribution as A record, type alias, in Route 53. The cloudfront Alternate Domain Names (CNAMEs) is service.openinfo.nl .
So I also tried creating the service.openinfo.nl as A record (DNS) in Route 53 pointing to the static IP of the WordPress lightsail server. But then I cannot create the same service.openinfo.nl as alias A record...
So I am stuck... Please advice? Many thanks in advance! Wouter
PS: openinfo.nl points to a cloudfront distribution with a certificate which points to a static site in a S3 buckets and works fine.
https://aws.amazon.com/blogs/startups/how-to-accelerate-your-wordpress-site-with-amazon-cloudfront/
https://forums.aws.amazon.com/thread.jspa?threadID=264002
First of all, you need to point your domain to CloudFront. You will want to set up a CNAME record in your DNS zone, pointing to the xyz.cloudfront.net address you get when creating the CloudFront distribution. The name of that record should be "www.example.com" if that's the domain you want to enable CloudFront on. Making example.com (without www) work as well could be a bit more tricky as you can't use a CNAME for technical reasons. Route 53 offers a way around this, but the DNS management in Lightsail is a simpler version of that service essentially. But you can always add an A record for example.com, pointing to your server IP address. Then your server can redirect those requests (additional configuration needed).
Secondly, CloudFront needs to contact your server on some address. You could add a second record to your DNS zone. This time you call it "origin.example.com" (or anything really), make it an A record, and point it to the server IP address.
The registrar for my domain is godaddy, I go to their DNS records section and I changed the A name to the elastic IP associated with my instance. Now when I type my domain in the browser, my website appears! However, it forwards it to the IP of my server.
Things I've tried (whether logical or not):
I'm using wordpress multsite so I changed the DOMAIN_CURRENT_SITE in wp-config.php to my new domain. No luck. Reverted.
I changed the 'site_url' and 'home' in my database to point to my domain. No luck. Tried one at a time etc. Reverted.
Changed ServerName to my new domain in httpd.conf (apache).
sudo hostname www.... (don't know what that does)
So I'd like to simply have my website open without it showing the IP in the address bar. Can someone help?
Thanks
EDIT:
Here's the DNS page of godaddy, I've blanked out the ip in the A records, but it's just the ip of my server.
First you need to set Custom NS in godaddy with AWS dedicated IPs then set them as DNS. If you are using Linux instance with cPanel then just add the domain in cpanel's addon-domain.
If you are using Windows instance then you should configure IIS.
If domain.tld is registered at GoDaddy and its default GoDaddy nameservers are changed to use NameSilo's nameservers, is it possible to manage domain.tld's dns at NameSilo?
Yes, if you changed the DNS servers, you may update DNS records on the side of Namesilo.
Just keep in mind this tip: your DNS records are managed on the side of DNS servers. If your domain name is pointed to GD's default nameservers, then you may update the records in the account with GoDaddy. If the domain name is delegated to the DNS servers of Namesilo - then in the account with them.
Also, depending on whether you have a hosting package or not, you may manage DNS records either in the account itself or in cPanel.
Normally, if you purchase a cPanel based hosting, you may update DNS settings in 'DNS Manager' (aka Domain Name Zone File) of your cPanel.
Registrars usually do not provide DNS for domains not registered with them. So if you have the domain at Godaddy, you need to use Godaddy NS (domaincontrol) or find a nameserver provider like Cloudflare. Exception is when you do hosting, in that case you can use registrar's NS for domains not registered with them.