Display the full URL of the home page?
In Drupal 7, The front page is normally set via system_site_information_settings().  It is an unaliased URL, so it is best to use the API.  I would do it as:

$home = url(variable_get('site_frontpage', 'node'), array('absolute' =&gt; TRUE));


In Drupal 8, there is a special route &lt;front&gt; that you can use with the Url() object

use \Drupal\Core\Url;

$home = Url::fromRoute('&lt;front&gt;')-&gt;setAbsolute()-&gt;toString();


However, in most circumstances you don't need to explicitly render out Url() objects as strings; you can just use the object itself.