diff --git a/sapl/templates/base.html b/sapl/templates/base.html
index 61db86669..8c4e24b6c 100644
--- a/sapl/templates/base.html
+++ b/sapl/templates/base.html
@@ -262,8 +262,7 @@
$(document).ready(function(){
let iframe_set_backend = {{ request|has_iframe|lower }}
if (iframe_set_backend && !inIframe() ) {
- let href = location.href
- location.href = href + '?iframe=0'
+ location.href = location.origin + '?iframe=0'
}
});