diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index da077045cdc..e386a4ad2cf 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1227,7 +1227,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print ''."\n";
// Favicon
- $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico', 1);
+ $favicon = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/img/favicon.ico';
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
if (empty($conf->dol_use_jmobile)) print ''."\n"; // Not required into an Android webview
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
@@ -1235,7 +1235,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
//if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n";
// Mobile appli like icon
- $manifest=dol_buildpath('/theme/'.$conf->theme.'/manifest.json.php', 1, 1);
+ $manifest = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/manifest.json.php';
if(!empty($manifest)){
print ''."\n";
}