What DNS does
When a person types a website address, their device asks a DNS server which IP address is behind that name. The answer is a set of records: A points to the server address, CNAME redirects a subdomain to another name, MX controls email, and TXT confirms ownership and protects against email spoofing.
These records are stored with whoever manages DNS for your domain: the registrar, the hosting provider or a specialized service. This is where losses happen most often: you moved to new hosting and forgot the email records, and messages stopped arriving.
Records almost every site needs
- A or AAAA: the main address of the site
- CNAME for www, if the site works with that prefix
- MX: the mail servers that handle your business email
- SPF, DKIM and DMARC in TXT, so that email from your domain does not land in spam
- TXT for confirming domain ownership in Google and Yandex
- Records for subdomains: store, blog, API
What a CDN is and when you need one
A CDN is a network of servers in different countries and cities. A site's static files, images, styles and scripts are stored on the nodes closest to the visitor and load faster. A CDN also smooths out traffic peaks, hides the real server address and filters some harmful requests.
For a site whose audience is almost entirely in Kazakhstan and whose server is in the country, the benefit of a CDN is more modest than for an international project. But for a site with many heavy images it is always handy. Keep in mind that .kz domains are subject to hosting rules, and before connecting a foreign CDN you need to check the registrar's terms.
How to change DNS without downtime
Write down the current records
Take a screenshot or an export. It is insurance in case something goes wrong.
Prepare the new server
Deploy a copy of the site and check it at its own address before switching.
Lower the TTL in advance
A day before the change, set a small value so the changes take effect quickly.
Switch the records
The site first, then check email. It is best to pick the time of lowest traffic for the change.
Check the result
Open the site from different networks, send a test email and check the certificate.