# What should Reverse DNS be set to?

**URL:** <https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294>\
**Category:** Help! (Home for newbies)\
**Created:** [July 6, 2021, 6:23pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294 "2021-07-06T18:23:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eng3](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/91b2a8/32.png) [@eng3](https://forum.virtualmin.com/u/eng3)\
**Post date:** [July 6, 2021, 6:23pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294/1 "2021-07-06T18:23:56Z")

</div>

**Operating system:** CentOS  
**OS version:** 8

I have virtualmin on a VPS. I initially named it srv  
So with my domain, its [srv.domain.com](http://srv.domain.com).  
Setting up virtualmin, it looks like the email is linked to [mail.domain.com](http://mail.domain.com).  
What should I set my reverse DNS to?  
[domain.com](http://domain.com)  
[srv.domain.com](http://srv.domain.com)  
[mail.domain.com](http://mail.domain.com)  
should I change my hostname to mail?

I have other domains pointing to my server too  
[mail.domain2.com](http://mail.domain2.com)  
[mail.domain3.com](http://mail.domain3.com)

everything points to my one IP

I can only set my IP’s reverse DNS to one thing

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [July 6, 2021, 8:48pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294/2 "2021-07-06T20:48:13Z")

</div>

It doesn’t matter as long as it resolves in both directions (i.e. whatever name it resolves to should resolve back to the same IP). The PTR can be `domain.tld`, but if you’re hosting mail for `domain.tld` you should not change the hostname to that.

You should not change your hostname to `mail` in any domain you host on the server (and hostname does not have to match reverse, but can as long as it isn’t a name you’re hosting virtual mail for).

---

<div class="post-metadata">

**Author:** ![eng3](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/e/91b2a8/32.png) [@eng3](https://forum.virtualmin.com/u/eng3)\
**Post date:** [July 6, 2021, 10:40pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294/3 "2021-07-06T22:40:09Z")

</div>

Ok. Was trying some online mail server checks and it complained that the IP didn’t resolve to [mail.domain.com](http://mail.domain.com). I want sure if it would affect SPAM filters. Note my DNS is on cloud flare

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [July 6, 2021, 11:04pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294/4 "2021-07-06T23:04:28Z")

</div>

As I said, reverse can be mail.domain.tld, if you want it to. But, your system hostname should not be.

Edit: But also those checkers are wrong, if they actually say what I think you say they’re saying. As long as you get DKIM, etc. right, the PTR just needs to resolve, it does not need to match some arbitrary name within one of your domains (it obviously cannot match all of them, since PTR is for the IP).

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [July 14, 2021, 11:05pm UTC](https://forum.virtualmin.com/t/what-should-reverse-dns-be-set-to/111294/5 "2021-07-14T23:05:24Z")

</div>

Closed on July 14, 2021, 11:05pm UTC

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
