What to Do During a DDoS Attack: A Step-by-Step Runbook
A calm, practical runbook for the first hour of a DDoS attack: how to tell an attack from a traffic spike, what to send your host, which mitigations to apply and how to …
Connect your domain to a VPS or hosting account with confidence. DNS record types in plain English, nameservers vs individual records, TTL and propagation, email records and how to verify everything.
You have a domain and a new server. Now you need to connect them so visitors typing your domain reach your site. That connection is made with DNS, the internet's address book. DNS can feel intimidating, but for most sites you only need a handful of records. This guide explains them in plain English and walks you through the setup step by step.
When someone visits example.com, their device asks a DNS resolver (usually run by their ISP or a public DNS service) for the address. The resolver asks the domain's authoritative nameservers, which return the records you configured. The resolver caches the answer for the time set by the record's TTL, then the browser connects to the IP address it received. Your job is to make sure the authoritative records are correct.
You have two options:
Before changing nameservers, copy every existing record, especially email records, or you may break email.
| Record | Purpose | Example |
|---|---|---|
| A | Points a name to an IPv4 address | example.com → 203.0.113.10 |
| AAAA | Points a name to an IPv6 address | example.com → 2001:db8::10 |
| CNAME | Points a name to another name | www → example.com |
| MX | Says which server receives email | example.com → mail.example.com (priority 10) |
| TXT | Text for verification and email security | SPF, DKIM, DMARC, site verification |
| NS | Lists the authoritative nameservers | Set at the registrar |
| CAA | Limits which certificate authorities can issue SSL | 0 issue "letsencrypt.org" |
| PTR | Reverse DNS: IP to name | Set by the IP owner (your host) |
@ (or blank), value your IPv4 address.@ with your IPv6 address, if your server is configured for IPv6.www to example.com, or A and AAAA records with the same IPs.Setting up WordPress? Our guide to installing WordPress on a VPS continues from here.
For shared hosting, your welcome email lists either nameservers or the server's IP address. Using the host's nameservers lets the hosting control panel manage DNS automatically, including mail records. Alternatively, keep your DNS provider and point the A record at the shared server IP. RexaHost shared hosting includes cPanel, which provides a DNS zone editor when you use its nameservers.
TTL (time to live) is how long resolvers cache a record, in seconds. A TTL of 3600 means resolvers may keep the old answer for up to an hour after you change it.
"Propagation" is really caches expiring at different times around the world. Nameserver changes at the registry can take longer, commonly up to a day or two. Our website migration guide shows how to use TTL to switch hosts without downtime.
If you host email for your domain, you need:
v=spf1 mx a ~all adjusted for your setup._dmarc): tells receivers what to do with failing messages, for example v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com.If you use a separate email provider, follow their record instructions and do not change MX records when moving your website.
# Linux / macOS
dig example.com A +short
dig example.com AAAA +short
dig www.example.com +short
dig example.com MX +short
dig example.com TXT +short
# Ask a specific public resolver
dig @1.1.1.1 example.com A +short
# Windows
nslookup example.com
nslookup -type=MX example.com
Online DNS checkers that query from many locations show whether the change has reached resolvers worldwide.
ipconfig /flushdnssudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderresolvectl flush-caches| Mistake | Result | Fix |
|---|---|---|
| Editing records at the registrar when nameservers point elsewhere | Changes have no effect | Edit at the provider your NS records point to |
| Changing nameservers without copying records | Email and subdomains break | Recreate every record first |
| Old A record left in place | Visitors randomly hit the old server | Remove duplicates |
| CNAME at the root domain | Invalid or conflicts with MX | Use A/AAAA or ALIAS |
| Wrong AAAA record | IPv6 visitors fail to connect | Fix or remove the AAAA record |
| Requesting SSL before DNS updates | Certificate validation fails | Wait until the domain resolves to the server |
Free certificate authorities such as Let's Encrypt verify that you control a domain before issuing a certificate, usually by checking a file on your web server over HTTP or a TXT record in DNS. That is why DNS must point to the new server before you request a certificate there. Wildcard certificates, covering every subdomain, require the DNS method. If you add a CAA record, make sure it allows the authority you use, or renewals will fail.
Subdomains such as app.example.com or shop.example.com can point to different servers. Add an A record for the subdomain with the target server's IP. This lets you run a store on one server and an app on another under the same domain.
Deploy a Linux VPS with a dedicated IPv4 and IPv6, add the A and AAAA records above, and your domain will be live as soon as caches refresh. Need help? Support is available 24/7 via Telegram @rexahost.
Changes to records often take effect within minutes to a few hours, depending on the previous TTL. Nameserver changes at the registry can take up to 24 to 48 hours.
Edit A records if you want to keep DNS at your current provider. Change nameservers if your host or DNS service should manage all records.
An A record points a name to an IPv4 address. A CNAME points a name to another name, which then resolves to an address.
Standard DNS does not allow a CNAME at the root (apex) domain. Use an A record, or a provider feature such as ALIAS or CNAME flattening.
Your computer, browser or resolver may have cached the old record. Wait for the TTL to expire, flush local DNS, or test with a public DNS lookup tool.
Plans in this article
Keep reading
A calm, practical runbook for the first hour of a DDoS attack: how to tell an attack from a traffic spike, what to send your host, which mitigations to apply and how to …
Hosting adverts love uptime percentages. Here is what 99.95% means in real minutes, the difference between a target and a contractual SLA, and how to measure availabilit…
Snapshots alone are not a backup plan. How to apply the 3-2-1 rule to a VPS with automated, encrypted, off-site backups and regular restore tests.