diff --git a/src/registrar/templates/domain_sidebar.html b/src/registrar/templates/domain_sidebar.html
index d31ce613a..aff9f5dab 100644
--- a/src/registrar/templates/domain_sidebar.html
+++ b/src/registrar/templates/domain_sidebar.html
@@ -34,7 +34,7 @@
>
DNSSEC
- {% if domain.dnssec_enabled %}
+ {% if domain.dnssecdata is not None or request.path|startswith:url and request.path|endswith:'data' %}
-
{% url 'domain-dns-dnssec-dsdata' pk=domain.id as url %}
diff --git a/src/registrar/templatetags/url_helpers.py b/src/registrar/templatetags/url_helpers.py
index 5b76c116f..2b983930f 100644
--- a/src/registrar/templatetags/url_helpers.py
+++ b/src/registrar/templatetags/url_helpers.py
@@ -18,6 +18,11 @@ def startswith(text, starts):
return text.startswith(starts)
return False
+@register.filter("endswith")
+def endswith(text, ends):
+ if isinstance(text, str):
+ return text.endswith(ends)
+ return False
@register.simple_tag
def public_site_url(url_path):