So, let me explain. Assuming i have to set up a website, and i've got a brand new dedicated server. Now, i could use a shared hosting server (which is in the same network as my dedicated one) as DNS server. So, the domain example.com points to ns1.sharedhost.com and ns2.sharedhost.com, and then, an A record on the shared server points to my dedicated server's IP. Is that a good practice (will the website load slower?) assuming the shared hosting server has 100% uptime and has more redundancy etc.?

1 Answer
1

DNS lookups take very little time and if used frequently will eventually be cached at several levels (on your computer, your router, at your ISP and possibly more). In short, decreasing DNS lookup time will not make your website load significantly quicker.

Having separate name servers can be a good practice, but it's more for reliability than speed. If you put the name server for example.com on the same server that's serving www.example.com, and the web server falls over and takes the rest of the system with it, you won't be able to resolve any domains that end in example.com, even if they are on different machines. Instead, you should have at least two name servers so if one goes down, you can still resolve your domain. This is perfectly normal and how DNS is intended to work. Your domain registrar will quite likely provide name servers, your hosting provider may offer them and you can get separate DNS services on the internet with prices ranging from £free to £expensive. By all means consider adding the dedicated server your website is hosted on as an additional name server, but do it because it adds another level of reliability (100% uptime does not exist); not because it will improve speed.