Pointing Hostinger to Vercel
When deploying a Next.js application to Vercel, connecting a custom domain is usually the final step. However, many developers run into the dreaded "Invalid Configuration" red warning like i do.
Here is a breakdown of why this happens and how we fixed it for lozi.me (this page :) ) me and chatgpt.
The Problem
After adding the domain to Vercel, the dashboard showed a configuration error. Even though the domain was purchased, it was pointing to Hostinger’s default "parking" page instead of the Vercel deployment.
Vercel was unable to verify ownership of the domain or issue an SSL certificate because it didn't have "authority" over the domain's DNS records.
The Root Cause: Nameserver Conflict
By default, when you buy a domain from Hostinger, it uses Hostinger Nameservers (ns1.dns-parking.com).
There are two ways to point a domain to Vercel:
A Records: You manually add IP addresses.
Nameservers (Recommended): You hand over the "management" of the DNS to Vercel.
The error occurred because the domain was stuck in "parking" mode, and Hostinger was still trying to manage the records that Vercel needed to control.
The Fix: Handing over the Keys
To fix this, we performed a Nameserver Migration. Instead of just adding a single record, we told Hostinger that Vercel is now the boss of this domain.
The Steps taken:
In Vercel: We identified the assigned nameservers: ns1.vercel-dns.com and ns2.vercel-dns.com.
In Hostinger: We navigated to the DNS / Nameservers settings and clicked "Change Nameservers."
The Swap: We deleted the old Hostinger entries and replaced them with Vercel’s nameservers.
Propagation: We waited for the "DNS Propagation".
Once the nameservers were updated, Hostinger displayed a message stating: "Your domain's DNS records are currently managed elsewhere."
This is exactly what we wanted. Vercel now has the authority to:
Automatically route traffic to your latest deployment.
Generate and renew SSL (HTTPS) certificates automatically.
Manage subdomains seamlessly.
Lesson learned: If you want the smoothest experience with Vercel, don't just point an IP address; change the Nameservers!