Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Chris Jones
Chris Jones
9,385 Points

DNS - Suggestions/recommendations on TTL

Hi guys,

Just watched the DNS video series - very good! One thing I was hoping would be covered in more detail was TTL. This is a topic I seem to revisit every year.

In my latest domain template, I've gone for a very low TTL. I understand that higher is better for live sites so there's less lookups but I have found this lower TTL nicer to work with when you need to make a DNS change quickly. Most of my sites are small businesses, low traffic (5000 visitors or less per month) so I don't think this is a big issue.

If we are talking in general, what are your preferred TTL values? Does anyone have a setup that they think strikes a good balance between lookups and flexibility?

Below is my DNS setup for most sites if they don't use Google Apps:

Refresh: 7200
Retry: 900
Expire: 1209600
Minimum TTL: 300

My simple domain template looks something like this:

<domainname>             A                       TTL    3600
<domainname>             A                       TTL    3600
ftp.<domainname>        CNAME    <domainname>.    TTL    14400
www.<domainname>    CNAME     <domainname>.   TTL    14400
<domainname>             MX            <domainname>     TTL    3600
<domainname>             TXT           ie SPF                   TTL    3600

Looking forward to reading other people's DNS / TTL setups and suggestions.

Thank you, Chris.

Hi, can you please show me the path/url/tracks(within treehouse) regarding the DNS series that you mention.. i would like to know more

i'm a noob regarding DSN, especially nameservers @ reverse etc..

thank you

Hi Musa Bin majid, you can find DNS Basics in the Technology Foundations Deep Dive. Here's a direct link! http://teamtreehouse.com/library/technology-foundations#dns-basics

Hi Christopher,

Tq for the info ^_^

1 Answer

Alan Johnson
Alan Johnson
7,625 Points

I've typically done super low TTLs on personal sites (60s or so), but on larger apps I usually set up a higher TTL.

On larger sites (like Treehouse!), there's usually a good bit of planning going on with DNS changes anyway, so we'll usually turn the TTL down low before a change (at least the current TTL amount of time before the change, but ideally 2-3x as long as the current TTL) and then make the change, and then crank the TTL back up afterward.