Delete the DNS record automatically when it is no longer used

Hi Team,
I just want the DNS records(NS) to be deleted automatically when it is no longer used for a custom time period like 20days or 30days or 40days.

For example:
I have a domain called test.com & the DNS record type is NS & name is abc.
If the abc.test.com no longer(20 days) used the DNS record should be deleted automatically.

Kindly help me with this.

That is not possible. You have to delete it yourself. All you could do is delete it automatically from your side, using the API at https://api.cloudflare.com/#dns-records-for-a-zone-delete-dns-record.

Thanks for your information

Is there any option or API to check the activity or audit of a particular DNS record?

ex: abc.test.com

If so it will be useful for me to automatically delete the DNS which is inactive for specific period of time.

You could try to work with https://api.cloudflare.com/#firewall-events-list-events but that’s really something you best fetch from your server logs.

Thank You Very Much

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