Display the full URL of the home page? Is it possible to display the full, absolute URL of the home page in Drupal 7, like  www.example.com/The-best-example-possible ?

I'd like to display the full URL of the home page, not just the hostname.
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.