diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index dab9fbba82f8581433a4e17df665df0d12b14b15..54be287f233beafc1365e6da30b48171b41a578c 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -895,8 +895,8 @@ the CaosDB Crawler successfully crawled the data and
 
 """
 
+    domain = get_config_setting("public_host_url")
     if get_config_setting("create_crawler_status_records"):
-        domain = get_config_setting("public_host_url")
         text += ("You can checkout the CrawlerRun Record for more information:\n"
                  f"{domain}/Entity/?P=0L10&query=find%20crawlerrun%20with%20run_id=%27{run_id}%27\n\n")
     text += (f"You can download the logfile here:\n{domain}/Shared/" + logfile)