


Save the file by pressing CTRL+X and confirm the changes. (ġh ) Negative caching TTL of 1 IN NS IN NS. BIND data file for hostinger-tutorials.xyz Use the following example and replace all IP address and domain instances with your actual domain name and the dedicated IP of your VPS: Using the nano command, create a new zone file for your domain: nano hostinger-tutorials.xyz Then, create a separate folder for your DNS zone files: mkdir -p zonesĪccess the newly created directory: cd zones

Connect to your VPS via SSH and go to: cd /etc/bind The next step is setting up a DNS zone for your domain on the virtual server. On Hostinger, you may easily do it using the domain management panel. Each entry needs to point to the VPS dedicated IP address. Start by creating new child nameservers for your domain. This method will switch the location of your DNS zone to the VPS, which means that all future DNS-related changes will have to be made through the newly created zone. Pointing a domain to VPS via custom nameservers is a bit trickier, as you will need to set up a new DNS zone on the virtual server. Method 2 – Pointing Domain to VPS via Custom Nameservers You may also do this using the dig command via terminal: dig A +short hostinger-tutorials.xyz However, most DNS checkup tools provide instant results. Keep in mind that DNS propagation can take up to 24 hours, thus you may have to wait at least a few hours before everything starts working. Option 1 – Using two A records NameĪfter pointing the domain to your VPS, it’s time to check whether the records were added correctly. Below, you’ll find a demonstration of how the entries should look like in your DNS zone. Using A record for the domain and CNAME for the Start by finding the current A record value and replace it with the dedicated IP address located earlier.Using two A records – one for the www subdomain and another for the domain itself.

There are two approaches to choose from at this point: Now that you know where your domain is pointed, navigate to the provider and open up your domain’s DNS zone.
