# Trigger script on removing domain

**URL:** <https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036>\
**Category:** General Questions\
**Created:** [February 27, 2026, 3:19am UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036 "2026-02-27T03:19:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![laodc](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@laodc](https://forum.hestiacp.com/u/laodc)\
**Post date:** [February 27, 2026, 3:19am UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036/1 "2026-02-27T03:19:12Z")

</div>

Hi there,

I am playing around this HestiaCP, learning how all it’s interactions work.

I have created templates to create DNS. Using external DNS, and utilize rndc to synchronize the data which is working perfectly fine. What I am trying to figure out now is when a domain is removed, is there a trigger script that can be called, so i can delete the zone? I’ve been searching on here, and looking quickly at the code base and I can’t seem to find any template-based approach to do it.

I am hoping I am simply missing something very obvious, otherwise how could I go about this approach without having to call additional commands (I prefer not to involve external calls, but if that is the only option I will have to look into it.)

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [February 27, 2026, 6:58pm UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036/2 "2026-02-27T18:58:18Z")

</div>

Hi,

> [@laodc](#):
>
> is when a domain is removed, is there a trigger script that can be called

No, unfortunately there isn’t a trigger/hook when removing a web domain.

---

<div class="post-metadata">

**Author:** ![laodc](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@laodc](https://forum.hestiacp.com/u/laodc)\
**Post date:** [February 28, 2026, 1:28am UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036/3 "2026-02-28T01:28:57Z")

</div>

Damn, that’s a shame.

OK, I am looking into making custom v- commands (I wish it supported something like override.d/ like rspam)

So far I have made 3 v-delete-user-a, v-delete-dns-domains-a, v-delete-dns-domain-a. Running these commands from the cli work as intended.

I added this commands into the data/api/\<access\_key\>, but when i try to call these commands via the /API/ I get “failed to login”

Am i missing a step to allowing these commands to be usable via the API?

---

<div class="post-metadata">

**Author:** ![laodc](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@laodc](https://forum.hestiacp.com/u/laodc)\
**Post date:** [February 28, 2026, 3:15am UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036/4 "2026-02-28T03:15:50Z")

</div>

Disregard the above, my linux-ness made to automatically add .sh to those filenames.

API is working as intended.

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [March 30, 2026, 3:16am UTC](https://forum.hestiacp.com/t/trigger-script-on-removing-domain/21036/5 "2026-03-30T03:16:03Z")

</div>

Closed on March 30, 2026, 3:16am UTC

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