How to point domain to VPS on Hostinger

intermediate 45 min read Updated 2026-03-13
Quick Answer

To point a domain to your Hostinger VPS, retrieve your VPS IP address from hPanel, then choose your method: edit DNS A records to point your domain to the VPS IP (easiest for Hostinger domains), use Cloudflare nameservers for added features, or set up custom nameservers for full VPS DNS control. DNS propagation takes 1-48 hours.

Prerequisites

  • Active Hostinger VPS with known IP address
  • Domain name registered at Hostinger or another registrar
  • Access to hPanel (Hostinger control panel)
  • Access to your domain registrar's DNS settings
  • Optional: Cloudflare account for proxy method or SSH client for advanced DNS setup

Step-by-Step Instructions

1

Retrieve Your VPS IP Address

Log into your Hostinger hPanel and navigate to VPS → select Manage for your server → click the VPS information tab. Copy your VPS IP address from this section. You'll need this IP for all pointing methods. Keep this value accessible as you'll reference it multiple times during the setup process.
Write down or copy your IP address to a text editor before proceeding to avoid switching between tabs repeatedly.
2

Method 1: Point Domain Using A Records (Recommended for Hostinger Domains)

This is the easiest method if your domain is registered at Hostinger. Log into hPanel and navigate to DomainsDomain Portfolio → click Manage next to your domain. In the left sidebar, click DNS/Nameservers → select the DNS records tab → click Manage DNS records. Before adding new records, delete any existing A, AAAA, or CNAME records that contain @, www, or cloudflare-resolve-to in their name field, as these will conflict with your VPS configuration.
Deleting conflicting records prevents DNS resolution errors and ensures your domain points cleanly to your VPS.
3

Add A Records for Root Domain and WWW

In the DNS records section, add your first A record with these values: Name: @ (represents your root domain), Points to: [your VPS IP address], TTL: default (typically 14400 seconds). Click Add Record or Save. Then add a second A record for the www subdomain: Name: www, Points to: [your VPS IP address], TTL: default. Alternatively, you can use a CNAME record for www instead: Name: www, Points to: yourdomain.com (without http:// or www prefix), TTL: default. The CNAME approach is often preferred as it automatically follows your root domain.
Using CNAME for www is more maintainable because if you change your root domain's IP, the www subdomain updates automatically.
4

Method 2: Point Domain Using Cloudflare (Any Registrar)

If your domain is registered elsewhere or you want Cloudflare's additional features (DDoS protection, caching), sign up at Cloudflare and add your site. Cloudflare will scan your existing DNS records. In your Cloudflare dashboard, locate and copy your two assigned nameservers (they typically look like ns1.dns-parking.com and ns2.dns-parking.com, but exact values vary). Return to hPanel, navigate to DomainsDomain PortfolioManageDomain Overview → click Edit next to DNS/Nameservers → select Change Nameservers. Paste the Cloudflare nameservers into the provided fields, leave other fields blank, and click Save.
Always copy nameservers directly from your Cloudflare dashboard to avoid typos, as incorrect nameservers will break your domain.
5

Configure DNS Records in Cloudflare

Once your nameservers are updated, log into Cloudflare and navigate to the DNS tab. Add an A record with Name: @, IPv4 address: [your VPS IP], Proxy status: DNS only, TTL: Auto. For the www subdomain, add a CNAME record: Name: www, Target: yourdomain.com (without www or http://), Proxy status: DNS only. The DNS only setting ensures Cloudflare doesn't proxy traffic, allowing your VPS to handle all requests directly.
Set Proxy status to 'DNS only' unless you specifically want Cloudflare to cache and proxy your content, which requires additional VPS configuration.
6

Method 3: Point Domain Using Custom Nameservers (VPS DNS Manager)

For domains registered elsewhere with full DNS control on your VPS, use custom nameservers. In hPanel, navigate to VPSManage → left sidebar DNS Manager → top section Add domain. Enter your domain name and click Add. Hostinger will assign custom nameservers (typically formatted as ns1.yourvps.hostinger.com and ns2.yourvps.hostinger.com). Note these nameservers. Then log into your domain registrar's control panel and update the domain's nameservers to these custom Hostinger values.
Custom nameservers give you complete DNS control on your VPS but require waiting for nameserver propagation, which can take up to 48 hours.
7

Configure DNS Records in VPS DNS Manager

Return to hPanel DNS Manager and find your domain in the list. Click Edit on the A record entry. Set Points to: [your VPS IP address] and change TTL: 300 (5 minutes is recommended for faster updates during testing). Click Update. If you need a www subdomain, add another A record with Name: www, Points to: [your VPS IP], TTL: 300. For production environments, you can increase TTL to 3600 (1 hour) or higher once everything is working.
Lower TTL values (300 seconds) allow DNS changes to propagate faster, useful when troubleshooting; increase TTL to 3600+ once your setup is stable.
8

Set PTR Record (Optional but Recommended)

A PTR (Pointer) record improves email deliverability and is useful for reverse DNS lookups. In hPanel, navigate to VPSSettingsIP address tab → click Set PTR record. Enter your domain name (e.g., yourdomain.com) and click Save. This associates your VPS IP with your domain for reverse DNS resolution, which email servers check to verify legitimacy.
Setting a PTR record is especially important if you plan to send emails from your VPS, as many email providers reject messages from IPs without matching PTR records.
9

Flush DNS and Verify Configuration

To speed up DNS propagation, flush your local DNS cache. On macOS, open Terminal and run
sudo dscacheutil -flushcache
. On Windows, open Command Prompt and run
ipconfig /flushdns
. On Linux, run
sudo systemctl restart systemd-resolved
. Then verify your DNS configuration using the dig command:
dig yourdomain.com
or
dig www.yourdomain.com
. The output should show your VPS IP address in the ANSWER SECTION. You can also use online DNS lookup tools to verify from multiple locations.
DNS propagation typically takes 1-48 hours globally; your local machine may resolve faster after flushing cache, but other users worldwide may need to wait longer.
10

Test Domain Access and Monitor Propagation

Open a web browser and navigate to your domain (e.g., yourdomain.com and www.yourdomain.com). If you see your VPS's default page or your website, the pointing is successful. If you see an error or a different site, wait 1-2 hours and try again, as DNS propagation is still in progress. Use online DNS propagation checkers (search 'DNS propagation checker') to see the status across different global DNS servers. These tools show which nameservers have updated and which haven't, helping you understand propagation progress.
If your site doesn't load after 24 hours, verify your A records and nameservers are correct by checking your registrar's DNS settings and comparing them to your hPanel configuration.

Common Issues & Troubleshooting

Domain still shows old website or 'site not found' error after 24 hours

Verify your A records are correctly set to your VPS IP address in hPanel DNS records. Check that you deleted conflicting A/AAAA/CNAME records before adding new ones. If using nameservers, confirm they match exactly what's shown in hPanel (including capitalization). Use <code>dig yourdomain.com</code> in Terminal to see which IP your domain currently resolves to. If it's not your VPS IP, the DNS records haven't propagated yet or are incorrectly configured.

DNS lookup shows old IP address instead of VPS IP

This indicates DNS hasn't propagated globally yet. Wait another 12-24 hours and recheck. If it's been more than 48 hours, verify your DNS records in hPanel are saved correctly. For A record method, ensure the <code>Points to</code> field contains your exact VPS IP with no extra spaces. For nameserver method, confirm the nameservers in your registrar's control panel match Hostinger's nameservers exactly. Clear your browser cache (Ctrl+Shift+Delete or Cmd+Shift+Delete) and try accessing the domain from a different network or device.

Cloudflare method: Domain shows Cloudflare error page instead of website

Ensure your A record in Cloudflare is set to <code>DNS only</code> (not <code>Proxied</code), which tells Cloudflare not to intercept traffic. Verify the A record's IPv4 address matches your VPS IP exactly. Check that your VPS is running a web server (Apache, Nginx, etc.) and listening on port 80 (HTTP) and 443 (HTTPS). If using Proxied mode, your VPS must have an SSL certificate configured. Test direct access to your VPS IP in a browser (e.g., <code>http://123.45.67.89</code>) to confirm the web server is responding.

Custom nameserver method: Domain shows 'nameserver not found' error

Custom nameservers require BIND DNS service running on your VPS. Verify BIND is installed by connecting via SSH and running <pre><code>systemctl status bind9</code></pre> (or <code>named</code> on some systems). If not installed, install it using your VPS's package manager. Ensure you've created a DNS zone file on your VPS for your domain and added the A records pointing to your VPS IP. Verify the custom nameservers in your registrar match exactly what hPanel assigned (e.g., <code>ns1.yourvps.hostinger.com</code>). Allow 24-48 hours for nameserver propagation.

Email not working or being marked as spam after pointing domain

Set your PTR record in hPanel (<code>VPS</code> → <code>Settings</code> → <code>IP address</code> → <code>Set PTR record</code>) to match your domain. Configure SPF, DKIM, and DMARC records in your DNS to improve email deliverability. Add SPF record: <code>Name: @</code>, <code>Value: v=spf1 ip4:[your VPS IP] ~all</code>. These records tell email providers your VPS is authorized to send emails for your domain. Test your email configuration using online email authentication checkers.

Exclusive Deal

Affiliate link. We may earn a commission at no extra cost to you.