# Point a Domain at a Hostinger VPS: A Records, Nameservers and Checks

URL: https://www.savemores.store/vps/point-domain-dns
Author: Mr. Ahmed · Published 2026-10-17 · Updated 2026-10-17 · VPS & deployment

## Short answer

- To point a domain at a Hostinger VPS, create A records for `@` and `www` that hold the server's IPv4 address.
- You can keep DNS at your current registrar or switch nameservers to Hostinger; adding A records is quicker and leaves email untouched.
- A new A record usually resolves within minutes, while a nameserver change can take 24 to 48 hours.
- Add an AAAA record only if your web server listens on IPv6, because a wrong one makes Let's Encrypt validation time out.
- Run `dig +short example.com A @1.1.1.1` and 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.

1. In 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.
2. Open your DNS editor and remove any existing A records on `@` or `www` that point elsewhere, such as a registrar parking page.
3. Create an A record with host `@` and your VPS IPv4 as the value.
4. Create a second A record with host `www` and the same IPv4.
5. Set the TTL to 300 seconds while you are testing; raise it to 3600 once everything works.
6. Add 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 |

Confirm the public IPv4 from the server itself, once you are logged in over SSH:

```bash
curl -4 ifconfig.me
```

> From the bench: Two A records on the same name with different IPs is the mistake I see most. Resolvers hand out both, so half your visitors hit the old parking page and the other half hit your server, and it looks like an intermittent bug. Clear out the old records before you add new ones. The same goes for a stale AAAA: Let's Encrypt prefers IPv6 when it is offered, so a bad AAAA makes Certbot time out while the A record looks perfect.

## Optional: 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.

> From the bench: Export or screenshot the old zone before touching nameservers. It costs a minute and it is the only rollback plan you have if mail stops arriving an hour later.

## 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.

Each command should print your VPS IP:

```bash
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.1
```

## Reverse 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.1` and the same for `www` both return your VPS IPv4.
- `dig +short example.com AAAA @1.1.1.1` returns 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.

Once a web server is listening on port 80, this should return response headers from your VPS:

```bash
curl -I http://example.com
```

## Where to go next

With the name resolving, lock the machine down before anything public runs on it: [the new-VPS security checklist](https://www.savemores.store/vps/secure-new-vps). After that, [deploy a Next.js app](https://www.savemores.store/vps/deploy-nextjs) or [put several sites on the same server](https://www.savemores.store/vps/multiple-sites-one-vps).

## FAQ

### 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.
