FeaturesWP CloudPricingEE CLIContactMy Account
Features
Team Access & User Permissions
Install
Resources
Community
CLEAR
Tutorials
Emails
Checking FQDN, Reverse-DNS/PTR, MX record
Topics
On this page
-
- Getting Started
- Git and File-System Layout (non-default setup)
- Version Constraints
- Managing Themes and Plugins (for entire WordPress site)
- Updating Themes and Plugins (for entire WordPress site)
- Adding Composer Support to Your Own Themes and Plugins (for developers)
- Using Composer to Manage Own Theme/Plugin Dependencies (for developers)
-
- Assigning Multiple IP Addresses to Single LAN Card
- Disable IPv6 on Ubuntu 12.04
- dsh – distributed shell
- fdupes – find & replace duplicate files with hardlinks
- GPG Keys Cheatsheet
- Increase "Open Files Limit"
- kill all php, nginx, mysql or any kind of processes
- Passwordless Authentication for SSH
- Screen
- search replace in multiple files useing grep xargs sed
- Setup sftp
- sysctl.conf
- Timezone Sync
- Using Google Public DNS on Ubuntu Server
- Using openssl to match private key, cerificate and CSR
- Configure Postfix to Use Gmail SMTP on Ubuntu
- Logrotate Example for Custom Logs
- PHP 5.5, MySQL, Postfix, Nginx and WordPress on Ubuntu
- Serverdensity
- Upgrade Ubuntu 10.04 to 12.04
- Using find and sed to replace strings in multiple files
- Webmin
-
- .my.cnf – mysql user & password
- Analyse slow-query-log using Anemometer
- Improving MySQL Query Cache
- MySQL Query Profiling
- Reset MySQL root password
- tuning-primer.sh – an alternative for mysqltuner
- Using MariaDB 10
- Install/Upgrade to MySQL 5.6 on Ubuntu 12.04 LTS
- Change WordPress Domain Name
- Character Sets and Collations
- Enable innodb_file_per_table
- Enable Remote Access (Grant)
- Installing Percona Toolkit
- Using tmpfs for temporary folder creation
- YARPP and InnoDB
- Convert MyISAM to InnoDB
- Using tmpfs for mysqldump & mysqlimport
- Convert from INNODB to MYISAM
- Analyse slow-query-log using mysqldumpslow & pt-query-digest
- mysqlcheck with cron to optimize automatically
- Using MySQLTuner to Optimize MySQL configuration
-
-
- Directly connect to PHP-FPM
- Generating core-dump for php5-fpm
- GeoIP
- Having php5 and php7 on same system.
- Install Xdebug and configure it with webgrind
- Installation of PHP Code Review Tools
- memcache
- PHP's Zend Opcache Config & Web Viewer
- Setting Sqlite support with PHP
- Using HHVM with PHP-FPM Fallback
- Using Redis for PHP Sessions on Ubuntu Server
- Installing PhpMyAdmin Quickly
- Moving PHP's session storage to tmpfs
- Install Xdebug and configure it with Netbeans
- Nginx – Enable PHP-FPM Status Page
- PHP-FPM: Socket vs TCP/IP and sysctl tweaking
- APC Cache Optimization & Monitoring Using Web Interface
- Checking if PHP/WordPress can send mails
- Debugging PHP Scripts Using slow_log and more
- Increase file upload size limit in PHP-Nginx
- Increase PHP script execution time with Nginx
-
- Performance Optimization
- Remove Query string of css/js files
- Setup ElasticSearch with ElasticPress
- Using Redis for WordPress Object-Cache
- WooCommerce Window Shopping Caching Technique
- Moving WordPress To New Server (Faster)
- Better wp-cron using linux's crontab
- 404 error- Page not Found!!!
- Debugging WordPress with Nginx
FQDN
Checking Hostname (FQDN)
Changing Hostname (FQDN)
Reverse DNS/PTR Record
dig command for reverse-DNS/PTR lookup
MX Records
How multiple domains works then!
Checking FQDN, Reverse-DNS/PTR, MX record
Before you start a mail server, you must verify your server’s FQDN, reverse PTR, MX records.
FQDN
FQDN (fully qualified domain name) is a name assigned to an individual machine. Its purpose is to uniquely identify a single machine across internet. It is name of your server.
Checking Hostname (FQDN)
Following commands show outcome for test.rtcamp.com (a subdomain we used for test mail server setup)
Check FQDN by running following command on server:
hostname -f
Outputs:
test.rtcamp.com
Changing Hostname (FQDN)
If its incorrect, or need a change you can do so by running:
hostname myhost.mydomain.mytld
As you can see, we can give any name to your server, you may be wondering how uniqueness works! That’s where reverse PTR come into picture.
Important – Set “A” Record for Host in FQDN
If you set your machine’s FQDN, for example mail.example.com, then at example.com DNS create an “A” record for subdomain “mail” poiting to your server’s IP address.
You can use example.com as your hostname also which most likely pointing to your server’s IP address already. It’s not FQDN technically, but I see it working mostly. Still, I will never use or recommend non-FQDN hostname.
Reverse DNS/PTR Record
Like “A” record help global internet find IP-address for a domain, pointer record (PTR) helps you find domain (FQDN) for an IP. As this is reverse to what commonly DNS is used for, this process is often referred as Reverse-DNS lookup also.
Having your FQDN (domain-name) resolve to IP and reverse-lookup for IP back to domain name can improve mail-delivery. This is also called Forward-confirmed reverse DNS.
Check IP address of your server using following command:
host test.rtcamp.com
You will see lines like below:
test.rtcamp.com has address 192.241.254.103
test.rtcamp.com mail is handled by 10 test.rtcamp.com.
If your server has multiple A records, you will see multiple lines for IP-addresses listed one-per-line. For real example run host google.com
Please note IP address for now. Check reverse PTR for IP address is correct:
host 192.241.254.103
Outputs:
103.254.241.192.in-addr.arpa domain name pointer test.rtcamp.com.
As you can see, reverse DNS lookup for IP shows same hostname (FQDN) in above example.
If you see incorrect hostname, you may contact your hosting company/ISP to get it fixed. Wrong Reverse PTR can lead to emails being rejected from your server. Please do not contact your domain registrar, if your domain-registrar and web/mail-hosting companies are differnt.
dig command for reverse-DNS/PTR lookup
You can also use dig tool also. Just write IP address in octet-reverse and append in-addr.arpa in the end:
dig +short ptr 103.254.241.192.in-addr.arpa
You will output like:
test.rtcamp.com.
MX Records
MX record tells Internet which machine will receive mails for a particular domain/subdomain.
Easiest way to check if who is handling mails for your domain is to run again:
host test.rtcamp.com
You will see lines like below:
test.rtcamp.com has address 192.241.254.103
test.rtcamp.com mail is handled by 10 test.rtcamp.com.
As you can see mails for test.rtcamp.com is handled by test.rtcamp.com only (same server).
If you are using Google Apps, you will see outcome like:
rtcamp.com mail is handled by 30 alt2.aspmx.l.google.com.
rtcamp.com mail is handled by 10 aspmx.l.google.com.
rtcamp.com mail is handled by 20 alt1.aspmx.l.google.com.
rtcamp.com mail is handled by 50 aspmx3.googlemail.com.
rtcamp.com mail is handled by 40 aspmx2.googlemail.com.
If you do not see “mail is handled” line, that means your domain do not have a MX record.
This is also fine as long as your do not want to handle incoming emails for a particular domain. You do NOT need MX records to send domain from a particular emails.
How multiple domains works then!
First question I was asked when we were writing this series was – if reverse-PTR to IP and IP to FQDN is must, how multiple domains works. Specially under shared-hosting scenario.
A short answer is – on shared hosting, even you send mail FROM your domain, in mail headers, FQDN (machine’s unique names) gets appended for which reverse-PTR is correctly mostly. As long as FQDN & Reverse-PTR are perfect, mails will work most likely. This is like first-check, not the only check!
Features
- Server Setup & Management
- Site Creation & Management
- Create WP Cloud Sites
- Speed & Caching
- Firewall Protection
- Backups & Recovery
- Logs & Monitoring
- Deployments & Developer Tools
- Team Access & User Permissions
Useful Links
Product
Other Products
Subscribe for curated product updates, tips, and announcements.
"*" indicates required fields
URL
This field is for validation purposes and should be left unchanged.
Email*
SIGN ME UP
Δ
© rtCamp, since 2009. All rights reserved.