How to point domain to VPS on Hostinger
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
Retrieve Your VPS IP Address
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.Method 1: Point Domain Using A Records (Recommended for Hostinger Domains)
Domains → Domain 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.Add A Records for Root Domain and WWW
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.Method 2: Point Domain Using Cloudflare (Any Registrar)
ns1.dns-parking.com and ns2.dns-parking.com, but exact values vary). Return to hPanel, navigate to Domains → Domain Portfolio → Manage → Domain 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.Configure DNS Records in Cloudflare
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.Method 3: Point Domain Using Custom Nameservers (VPS DNS Manager)
VPS → Manage → 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.Configure DNS Records in VPS DNS Manager
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.Set PTR Record (Optional but Recommended)
VPS → Settings → IP 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.Flush DNS and Verify Configuration
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.Test Domain Access and Monitor Propagation
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.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.