• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

How To Ensure Your VPS Server Emails Aren’t Marked As Spam

By Bhagwad Park on November 22, 2022 0

How To Ensure Your VPS Server Emails Aren’t Marked As Spam

If you’re like me, you rely on e-mails from your VPS server to inform you about important activities like backups, updates, and expiring SSL certificates. If you properly set up notifications, you minimize your time logging into your VPS and checking stuff. So it’s extremely important to ensure that these e-mails reach you on time. However, many e-mail providers like Gmail and Outlook don’t accept e-mails from IP addresses and e-mail IDs without certain DNS entries.

So this quick tutorial will help you insert the right DNS entries so that your domains can send mail without going to spam.

Accessing Your DNS Records

A good number of people use the same company for their web hosting and their domain management. If you’re one of them, you should have an interface in your web hosting admin screen for changing your DNS records. Personally, I point my nameserver to Cloudflare and manage the DNS records from there. If you use Cloudflare as well, you’ll have to log into the dashboard and make the necessary changes.

Allowing Someone to Send Mail on Your Behalf

Setting up, configuring, and maintaining an e-mail server on your own can be a harrowing task. You must deal with storage, spam, mail queues, and all kinds of hassles. As a result, many people outsource their e-mail functionality to 3rd parties like Google that handle the e-mail on their behalf instead. Earlier, I’d written about Cloudflare’s free e-mail routing that catches e-mails sent to an address and forwards them to another e-mail address of your choosing.

But this can be dangerous. After all, if a 3rd party can send e-mails on your behalf, what’s to prevent someone else from spoofing an e-mail on your behalf? And that’s why we need SPF records.

Adding an SPF Entry to Your DNS Records

An SPF DNS entry informs those who receive e-mails which parties are authorized to send e-mails on your behalf. It’s easy for anyone to spoof the “From” address on an e-mail message, but they can’t hide their IP address or the server from which the e-mail was sent. An SPF record is a compact way of informing the world which IP addresses and servers are allowed to handle e-mail on your behalf.

An SPF record has a format that looks like this:

v=spf1 ip4:xxx.xxx.xxx.xxx include:firstdomain.com include:seconddomain.com ~all

Replace xxx.xxx.xxx.xxx with the IP address of the servers you use to send your mail. Replace firstdomain.com and secondomain.com with the domains that your VPS server uses to send e-mail. If you use a 3rd party service to send e-mail, check out their documentation to find out what you should include here. It’ll be different for each provider.

For example, to use Cloudflare routing, I have to use the following address in the SPF record: _spf.mx.cloudflare.net like this:

SPF Record in DNS
SPF Record in DNS

As you can see, I’ve also included the domains that my server uses to send me notification e-mails of server events. This ensures they don’t get caught in Google’s and Outlook’s spam filters.

Mail DNS Entries Can be Confusing

My biggest problem is that I do my research on a particular issue and then forget about it afterward. Later, when I need to change something, I must re-learn it all over again! SPF and DNS records for e-mail are no different. Luckily, these don’t need to be modified once you have the correct DNS entries unless you change your e-mail provider. Hopefully, you found this article useful!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in