Pi-hole DNS cache exception

Hello,
I want to make a request for a domain that does not get cached by Pi-hole because the information is time sensitive.
Now the behavior is that my device requests data, but gets served old data from the cache, in stead of fresh data from the server.

How can I do it in Pi-hole?

Otherwise the system works good.

Regards,
Frojac.

Run from your Pi-hole machine, please share the result of the following command:

dig your.domain.here

where you substitute your.domain.here with your actual time sensitive domain.

Also, please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

; <<>> DiG 9.16.48-Debian <<>> your.domain.here                   
;; global options: +cmd                                                          
;; Got answer:                                                                   
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2407                         
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1          
                                                                                 
;; OPT PSEUDOSECTION:                                                            
; EDNS: version: 0, flags:; udp: 1232                                            
; COOKIE: 7845d06308a8ab930100000066f282841b37XXXXXXXXXXXX (good)                
;; QUESTION SECTION:                                                             
;your.domain.here. IN    A                                        
                                                                                 
;; ANSWER SECTION:                                                               
your.domain.here. 300 IN A       34.xxx.xxx.xxx                    
                                                                                 
;; Query time: 59 msec                                                           
;; SERVER: 192.xxx.xxx.xxx#53(192.168.1.1)                                           
;; WHEN: Tue Sep 24 11:12:36 CEST 2024                                           
;; MSG SIZE  rcvd: 104

Debug token is:
https://tricorder.pi-hole.net/gi0mgH6X/

Your debug log shows that you have not custom configured your Pi-hole to serve stale DNS records, so Pi-hole sticks with its default behaviour of caching DNS records according to DNS standards.

DNS records come with a TTL, which indicates the maximum time a DNS resolver may cache that record for before issuing a new request.

In your case, that TTL is set to 300 seconds, or five minutes:

;; ANSWER SECTION:                                                               
your.domain.here. 300 IN A       34.xxx.xxx.xxx

That would mean that it would take at least those 5 minutes before changes in DNS records could be expected to be reflected in public DNS. Usually, it could even take a bit longer before all public DNS resolvers would have updated their cached records, as retrieving those updated records also takes some time.

Do you own that your.domain.here domain?

No, I do not own the domain.
What you tell me says that all is working as it should, and I just misunderstand the way Pi-hole cache works. It just stores the DNS record, right?

I may have confused it for storing the actual data information, like Squid does?

As a filtering DNS server, Pi-hole only ever sees and handles DNS requests.

If your observation is about website content being cached too long, then Pi-hole won't be involved at all.

Thanks so much for your time and explanation! Then all is okay after all.

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