• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Change all domains TTL

Chris1

Regular Pleskian
Hello,

I'd like to change all domains TTL, when I try to change the DNS template it doesn't seem to change every domains TTL, not sure why?

I saw this: http://kb.odin.com/en/120025

I notice that there are two values I probably need to change: ttl='900', ttl_unit='60'

What does this mean exactly? What is the difference between the ttl and ttl_unit?
 
TTL is value, TTL_UNIT is measure - sec/min/hours/...
 
Hi Igor,

Thanks for that. So in the above example what does the 60 and 900 mean?

Would this script work on both Plesk 10 and 12?
 
900 and 60 means 900 minutes.
Yes, I think it should work for both versions.
 
This is the script we use prior to moving sites between servers to lower the TTL

3600S = 3600 seconds = 1 hour

uncomment the $domdone you want to test what will be done or to actualy do it

<?php

$pwfile = "/etc/psa/.psa.shadow";

$pw = trim(file_get_contents($pwfile));

mysql_connect("localhost","admin", $pw);
mysql_select_db("psa");

if (!($resdoms=mysql_query("select name from dns_zone where status = '0' ORDER by name;"))) {
print("MySQL error: " . mysql_error());
}

$aantal = mysql_num_rows($resdoms);
echo "$aantal domains found ... Starting domains\n";
for ($r = 0; $r < mysql_num_rows( $resdoms); $r++) {
$row = mysql_fetch_array ($resdoms);
//$domdone = "would do /usr/local/psa/bin/dns --update-soa $row[0] -soa-ttl 3600S\n";
$domdone = shell_exec("/usr/local/psa/bin/dns --update-soa $row[0] -soa-ttl 3600S");
echo "$domdone";
}

?>

There is a lot more you can adjust with the dns utility
exented documentation is here

http://download1.parallels.com/Plesk/PP12/12.0/Doc/en-US/online/plesk-unix-cli/37771.htm#

hope this helps

regards
Jan
 
Thank you, much appreciated!

Just a question though, why doesn't the TTL get changed for all domains when you do it via the GUI? "Tools & Settings" > "DNS Template" > "SOA Records Template"

Some domains TTL change but some don't?
 
Back
Top