Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Use a PTR Record With a VPS

This guide explains what a PTR record is and how to get one set for your VPS. It matters most if you send email from your server.

Domains and DNS2 min read6 steps

What is a PTR record?

A VPS is a virtual private server. It is your own slice of a bigger computer, with its own IP address. An IP address is a number that identifies a computer on the internet, like a house number.

Normal DNS turns a name into an IP address. A PTR record does the opposite. It turns an IP address back into a name. This is called reverse DNS. It is like looking up a name by its phone number.

Why does it matter?

Many mail servers check the PTR record of any server that sends them mail. If there is none, or the name looks wrong, they may treat your email as spam. A good PTR record helps your messages reach the inbox.

Who sets it?

You cannot create a PTR record in your domain's normal DNS zone. The company that owns the IP address controls it. For a VPS this is usually the hosting provider. You ask them to set it.

Steps

  1. Pick a hostname you want to use, for example mail.yourdomain.com.
  2. In your domain's DNS, add an A record. An A record points a name to an IP address. Point your chosen hostname to your VPS IP.
  3. Log in to the client area.
  4. Open a support ticket.
  5. Give your VPS IP address and the hostname you want as the PTR record.
  6. Wait for support to confirm the change.

Some plans may let you set it yourself in a panel. Ask support if that is possible for you.

Check your PTR record

Run this command from any computer with a terminal. Replace the number with your IP address.

dig -x 203.0.113.10 +short

This asks DNS which name belongs to that IP. It should print your hostname.

On Windows you can use this instead.

nslookup 203.0.113.10

This also shows the name linked to the IP.

Good practice

  • The A record and the PTR record should match each other.
  • Set your mail server's hostname to the same name.
  • Use one name per IP address.
Tip: After the change, send a test email to a Gmail address. Open it and check the message details for warnings.

Quick recap

  • A PTR record maps an IP address back to a name.
  • It helps mail from your VPS avoid spam folders.
  • Create the matching A record first, then ask support to set the PTR.
  • Test it with dig -x or nslookup.