diff --git a/templates/partials/header.html b/templates/partials/header.html
index f4d8b1645..e56ebbb50 100644
--- a/templates/partials/header.html
+++ b/templates/partials/header.html
@@ -40,7 +40,7 @@
{{link_label}}
- {% elif current_url is containing("www_threefold_io") %}
+ {% elif header_label is starting_with("/") %}
{% set path = current_url ~ link_path[1] %}
{{link_label}}
@@ -174,7 +174,7 @@
{{link_label}}
- {% elif current_url is containing("www_threefold_io") %}
+ {% elif header_label is starting_with("/") %}
{% set path = current_url ~ link_path[1] %}
{{link_label}}
diff --git a/templates/shortcodes/button.html b/templates/shortcodes/button.html
index d5c09b0be..acf453f9d 100644
--- a/templates/shortcodes/button.html
+++ b/templates/shortcodes/button.html
@@ -7,8 +7,8 @@
{{ body | trim_start_matches(pat=" ") | safe}}
-{% elif current_url is containing('www_threefold_io') %}
-{% set btn_path = 'www_threefold_io' ~ path%}
+{% elif path is starting_with('/') %}
+{% set btn_path = 'www_threefold_io' ~ path %}
{% else %}
{% endif %}