VPS & deployment
Point a Domain at a Hostinger VPS: A Records, Nameservers and Checks
Point a domain to your Hostinger VPS: copy the IPv4, set A and optional AAAA records at any registrar, confirm with dig, then request an SSL certificate.
By Mr. Ahmed · 20+ years in tech
Published · 6 min read
The short answer
- 01To point a domain at a Hostinger VPS, create A records for
@andwwwthat hold the server's IPv4 address. - 02You can keep DNS at your current registrar or switch nameservers to Hostinger; adding A records is quicker and leaves email untouched.
- 03A new A record usually resolves within minutes, while a nameserver change can take 24 to 48 hours.
- 04Add an AAAA record only if your web server listens on IPv6, because a wrong one makes Let's Encrypt validation time out.
- 05Run
dig +short example.com A @1.1.1.1and wait for your VPS IP before running Certbot.
Pick your approach: add records or move the whole zone
DNS is the only thing that connects a name to your server. There are two ways to set it up. Either you leave DNS with whoever hosts it today and add records that aim at the VPS, or you hand the entire zone to Hostinger by changing nameservers and then manage records in hPanel.
For one VPS I nearly always take the first route. It touches two records and nothing else, so the mail setup and any verification records on the domain keep working. Moving nameservers is worth it only if you genuinely want domain, DNS and server under a single Hostinger login.
| Approach | What changes | Choose it when |
|---|---|---|
| Add A records | Two records at your existing DNS provider | Email or other services already run on the domain |
| Switch nameservers | Nameservers at the registrar, then all records in hPanel | You want domain, DNS and VPS in one Hostinger account |
The procedure
The records are identical no matter where DNS lives. In hPanel the editor sits under Domains, then your domain, then DNS / Nameservers. GoDaddy keeps it on the domain's DNS tab, and Namecheap calls it Advanced DNS.
- 1In hPanel, open VPS, select the server and read the overview. Copy the IPv4 address (four numbers, for example 203.0.113.10). Most servers also show an IPv6 address; you may not need it.
- 2Open your DNS editor and remove any existing A records on
@orwwwthat point elsewhere, such as a registrar parking page. - 3Create an A record with host
@and your VPS IPv4 as the value. - 4Create a second A record with host
wwwand the same IPv4. - 5Set the TTL to 300 seconds while you are testing; raise it to 3600 once everything works.
- 6Add an AAAA record for
@with the IPv6 address only if your web server is actually configured to listen on IPv6.
| Type | Host | Value | TTL |
|---|---|---|---|
| A | @ | VPS IPv4 | 300 while testing, 3600 after |
| A | www | VPS IPv4 | 300 while testing, 3600 after |
| AAAA (optional) | @ | VPS IPv6 | Same as the A records |
curl -4 ifconfig.meOptional: hand DNS over to Hostinger
If you prefer to manage records in hPanel, set the domain's nameservers at your registrar to the pair hPanel displays. When this was written they were ns1.dns-parking.com and ns2.dns-parking.com, but use whatever hPanel shows you. Then recreate the A records from the table above inside hPanel.
Before you flip the nameservers, copy every MX, TXT (SPF, DKIM, site verification) and CNAME record into the new zone. A nameserver change swaps out the entire zone, so any record you forget simply stops existing, and email is normally the first casualty.
Waiting for propagation
Most record changes show up within minutes. A resolver that cached the old answer can keep serving it until the previous TTL expires, which is why a short TTL during setup helps. Nameserver changes are slower and can take 24 to 48 hours.
dig +short example.com A
dig +short www.example.com A
# Ask a public resolver directly, bypassing your local cache
dig +short example.com A @1.1.1.1
dig +short example.com AAAA @1.1.1.1Reverse DNS if the server sends its own mail
If the VPS delivers mail directly, for password resets or a contact form, set a PTR record so the IP resolves back to your hostname. Hostinger exposes it in the VPS settings in hPanel. Without it, Gmail and Outlook are much more likely to file your messages as spam.
If mail goes out through Hostinger Email or a transactional sending service, you can leave PTR alone.
Verify it worked
Do not move on until all of these pass. The order matters: public DNS first, then the web server, then the certificate.
dig +short example.com A @1.1.1.1and the same forwwwboth return your VPS IPv4.dig +short example.com AAAA @1.1.1.1returns nothing, or returns the IPv6 your server really listens on.- From a phone on mobile data (a different resolver from your home network), the domain reaches the server.
- Only now run Certbot. Let's Encrypt rate-limits failed validations, so trying before DNS is correct just burns attempts.
curl -I http://example.comWhere to go next
With the name resolving, lock the machine down before anything public runs on it: the new-VPS security checklist. After that, deploy a Next.js app or put several sites on the same server.
Questions people ask
How long until my domain points to the VPS?
Usually a few minutes for a new A record. A nameserver change can take up to 24 to 48 hours, though it often finishes sooner.
Should www be an A record or a CNAME?
Either is fine. A CNAME from www to the root means only one record to update if the IP changes, while two A records are easier to reason about. Never create both for the same name.
Does the domain have to be registered at Hostinger?
No. Any registrar works, as long as you can edit the DNS records for the domain.
Why do I still see the old site?
Something between you and the server cached the old record. Query a public resolver with dig @1.1.1.1, flush your local DNS cache or test on mobile data; if the public resolver shows the new IP, it is only a cache.
Independent site, not Hostinger. Buy through my links and Hostinger pays me a referral fee; your price is the same or lower. How that works.