diff --git a/resources/templates/provision/grandstream/ht802/{$mac}.xml b/resources/templates/provision/grandstream/ht802/{$mac}.xml
index 7f4db0ab8d..dc95b8e7fd 100644
--- a/resources/templates/provision/grandstream/ht802/{$mac}.xml
+++ b/resources/templates/provision/grandstream/ht802/{$mac}.xml
@@ -1509,7 +1509,11 @@
+{if isset($grandstream_dns_mode)}
+ {$grandstream_dns_mode}
+{else}
0
+{/if}