• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

DNS Server Setup

M

mjag12

Guest
Hello.
I am an new member here and just wanted some feedback on my DNS Server Setup within Plesk. I have read through the posts and I am still a bit confused.....

I have registered 2 Namservers:
  • ns.domainname.com
  • ns2.domainname.com
They both have the same IP Address. xx.xx.xx.93

Here is my setup in the Server DNS.

domainname.com.<domain>. NS ns.domainname.com.
domainname.com.<domain>. NS ns2.domainname.com.
<domain>. A <ip>
mail.<domain>. A <ip>
ns.<domain>. A <ip>
webmail.<domain>. A <ip>
ftp.<domain>. CNAME <domain>.
<domain>. MX (10) mail.<domain>.
<ip> / 24 PTR <domain>.

I dont know if I am missing something with the config of this. I am planning to have 4 websites/domains for this. I appreciate any help that you could offer.

Thanks,
mjag12
 
Domain DNS and Template Examples ...

You have posted your DNS template which will affect all newly created domains. Here are 2 examples, the first is for your main hosting domain's DNS, the other is for the DNS Template. You will notice they are not exactly the same. Look at these examples and compare them to your current settings.
Code:
Primary Server Domain DNS (2 nameservers, different IPs)

mydomain. com.			NS		ns1. mydomain. com.
mydomain. com.			NS		ns2. mydomain. com.
ns1. mydomain. com.		A		xx. yy. zz. aaa
ns2. mydomain. com.		A		xx. yy. zz. bbb
mydomain. com.			A		xx. yy. zz. aaa
mail. mydomain. com.		A		xx. yy. zz. aaa
webmail. mydomain. com.		A		xx. yy. zz. aaa
ftp. mydomain. com.		CNAME		mydomain. com.
*. mydomain. com.		CNAME		mydomain. com.
[url]www.[/url] mydomain. com.		CNAME		mydomain. com.
mydomain. com.			MX 10		mail. mydomain. com.
xx. yy. zz. aaa/32		PTR		mydomain. com.

Plesk DNS Template for additional created domains: (2 nameservers)

<domain>.		NS		ns1. mydomain. com.
<domain>.		NS		ns2. mydomain. com.
<domain>.		A		<ip>
webmail. <domain>.	A		<ip>
mail. <domain>.		A		<ip>
ftp. <domain>.		CNAME		<domain>.
*. <domain>.		CNAME		<domain>.
<domain>.		MX 10		mail. <domain>.
<ip>/24			PTR		<domain>.
If you are going to host multiple domains per IP, then you may want to leave out the <ip>/24 PTR <domain>. in the template (suggestion).

All references to 'mydomain.com' refer to your main hosting domain, not to client domains.

These are just generic examples and depending on your exact setup/needs may have to be slightly modified, but they are a good starting point to use as a base.
 
jamesyeeoc,

Thanks for the reply, that helped out alot... Very much appreciated.... I have one issue regarding the mail. I can send mail but cant recieve any messages???

I have a total of three IP addresses, would you suggest setting those up as well as Nameservers for the unique IP addresses.
I do have ns.mydomain.com and ns2.mydomain.com set to the same IP address.

Any recommendations would be greatly appreciated.. I still want to set up other domains, do I just add the settings in the Server DNS and the Domain DNS.??



Here is my Server DNS config....

mydomain.com.<domain>. NS ns.mydomain.com.com.
mydomain.com.<domain>. NS ns2.mydomain.com.
<domain>. A <ip>
mail.<domain>. A <ip>
ns.<domain>. A <ip>
webmail.<domain>. A <ip>
ns.mydomain.com.<domain>. A xx.xxx.xxx.93
ns2.mydomain.com.<domain>. A xx.xxx.xxx.93
mydomain.com.<domain>. A xx.xxx.xxx.93
mail.mydomain.com.<domain>. A xx.xxx.xxx.93
webmail.mydomain.com.<domain>. A xx.xxx.xxx.93
ftp.<domain>. CNAME <domain>.
www.[b]mydomain.com[/b].<domain>. CNAME mydomain.com.
*.mydomain.com.<domain>. CNAME mydomain.com.
ftp.mydomain.com.<domain>. CNAME mydomain.com.
<domain>. MX (10) mail.<domain>.
mydomain.com.<domain>. MX (10) mail.mydomain.com.com.
<ip> / 24 PTR <domain>.:D

Here is how I have set up my Domain DNS settings.


mydomain.com. NS ns.mydomain.com.
mydomain.com. NS ns2.mydomain.com.
mail.mydomain.com. A xx.xxx.xxx.93
ns.mydomain.com. A xx.xxx.xxx.93
webmail.mydomain.com. A xx.xxx.xxx.93
mydomain.com. A xx.xxx.xxx.93
ftp.mydomain.com. CNAME mydomain.com.
www.mydomain.com. CNAME mydomain.com.
mydomain.com. MX (10) mail.mydomain.com.
xx.xxx.xxx.93 / 24 PTR mydomain.com.

Thanks,
mjag12...
 
ERROR: look at what you posted, the entries with mydomain.com.com are incorrect.

In your main domain's DNS, you still don't have an A record for ns2. You also don't have a wildcard CNAME, it is not required, but without it if someone mistypes wwx.mydomain.com or anything like that, then they will not get to your site.

In the Server DNS Template, if you are going to leave the PTR, then at least change it from /24 to /32. You do not need the record for ns.<domain>. A <ip> for the hosted domains. You should not have anything like: mydomain.com.<domain>

I think you are maybe getting confused between the Server DNS Template, which is used when new hosted domains are created to formulate a base set of DNS entries, and the main domain's DNS which will be quite similar, but with a couple of extras since it is the main domain of the server.

Please compare your Template and what I posted as a Template, then compare your main domain's and what I posted for the domain example.
 
jamesyeeoc,

Thanks for clearing that up, it now makes sense....

Here is my Server DNS template as recommended. I made the appropriate changes as suggested in the Domain DNS.

I still cant receive emails??? Do I need to stop and then restart any services in the Service Management Console to get it to work...



<domain>. NS ns.mydomain.com.
<domain>. NS ns2.mydomain.com.
<domain>. A <ip>
mail.<domain>. A <ip>
webmail.<domain>. A <ip>
gateway.<domain>. A <ip>
ftp.<domain>. CNAME <domain>.
*.<domain>. CNAME <domain>.
<domain>. MX (10) mail.<domain>.

Again, thanks for you assistance with this...

mjag12
 
Your email problem could be a number of things, hard to say. Could be as simple as DNS propagation, to the Qmail service not starting (again for a number of reasons).

Does the Plesk Control Panel: Server - Service Management show all services as running? Even if it does, there is no harm in restarting each service one at a time...

First go to dnsreport.com and run a report on your main domain, either post me a link to the report, or if you insist on keeping details off the board, email me with the information or at least the real domain name j a m e s y e e o c @ y a h o o . c o m
 
Ok, the dnsreport looks ok except that it cannot connect.

When I try to telnet direct to your server's port 25, your server is returning the error:

Sendmail: Illegal option -- A

Since Plesk uses Qmail, which replaces the standard sendmail script with it's own... After installing Plesk, did you do any type of email addons or re-install the standard sendmail package?? Or antivirus or spamassassin (other than the stock Plesk stuff?)

Normally on a Plesk server, /usr/sbin/sendmail becomes a symlink to /var/qmail/bin/sendmail which is Qmail's replacement for sendmail. Basically it takes whatever is normally passed to sendmail and uses it's qmail-inject to actually put it into the mail queue.

You could try removing any addons or modifications, or force a re-install of the psa-qmail package. Normally the RPM is downloaded and stored on the server. If you are running a RH type OS, do

locate psa-qmail-

and see where the RPM file is, then just do

rpm -Uvh --force <name of package>
 
jamesyeeoc,

Thanks again for the assistance....

The issue was on the ISP side.

mjag12
 
Good to hear it is resolved. Did the ISP happen to say what exactly they had misconfigured?
 
I replied to the support request and have not heard back yet. Once I do I will post the results.

Thanks,
mjag12
 
Good thread - thanks for the DNS setup info.

Plesk 8 only allows 24 in this option in primary domain setup:

xx. yy. zz. aaa/32 PTR mydomain. com.
 
Hi,

This is a good thread. Would have been helpful if I found it when setting everything up :) . Just one question though...Why would you do this? Whats the problem with having this on domains hosted on 1 IP address?

"If you are going to host multiple domains per IP, then you may want to leave out the <ip>/24 PTR <domain>. in the template"




Thanks,
 
DNS setup

Hi,
I hope you don't mind me opening this thread again but I could really use some help setting my DNS up. Really new at this and struggling.

I have used the DNS settings that jamesyeeoc posted and the template worked fine. What I am stuck on is what is my Primary Server Domain DNS? is it the name that I have the dedicated server under or is it the name I have created the nameservers under.

I assume it is the name the server is under the problem I have is that the name will let me ad records but there are NS records that can't be changed hence where the server resides.

ns1.mediatemple.com
ns2.mediatemple.com

Do I just ad the records to the name that you have posted or do I need to only have what you have posted?

My other question is, should my nameservers be part of the name the server is under or can I use any domain name I have registered for the nameservers?

Any help will be really be appreciated!..thanks.
 
Back
Top