When creating your DNS records for a custom domain with Bubble, is the setting you choose for the cache duration setting TTL important? For example, would a lower time like 5 minutes put extra strain on something, or would choosing a longer value like 24 hours make it take longer for fresh content to be delivered?
As you probably already know, TTL = time to live.
It tells nameservers (which, among other things, turn a domain name into an IP address when you go to one) how often it should refresh the cache.
That means that if you set TTL to 5 minutes, youâre telling the nameservers âhey, this might change frequently so please take a lookâ. Equally, if you set TTL to 24 hours, it will mean that the nameserver will check it less frequently.
It wouldnât change how long it takes for content to be delivered, if you mean âwhen I create a blog post will a lower TTL help it appear in search quicker?â
However, if youâre changing domains on an app, and minimising downtime is a priority, then it can be helpful to reduce the TTL in advance so that when you change it, the changes propogate quicker.
In terms of âextra strain on somethingâ - technically yes, but nothing worth considering at all. Iâd speculate that maybe a higher TTL would be slightly faster to load in some instances because the nameserver is less likely to have to look it up as they have it in cache, but this isnât worth thinking about.
Thank you for the insight, George!
I was having a DNS issue with an app I recently moved over from the main cluster to our dedicated server. I was getting the âtoo many redirectsâ error you see mentioned on the forums from time to time. I was certain that I had my DNS records set correctly as Iâve gone through this process before. I spoke with Bubble support about it and asked if my TTL settings had any effect on the issue, and they said:
It should not be. In this case, Cloudflare failed to complete checking your domain after the migration and required a manual refresh. This can happen, but it is something that is only on our end and not on your end at all, so you had everything set up correctly. We typically recommend keeping your TTL at either Auto or 5 minutes (300 seconds).
So, I guess I already found an answer to my own question but Iâll leave it here in case anyone else is trying to determine at what length of time to set their TTL. Bubble support just needed to âmanually refresh the domainâ and that fixed it instantly.