# Url

> Url provides a set of static methods for managing URLs.

[API reference](/docs/api/index.md) › [yii](/docs/api/yii/index.md) › [helpers](/docs/api/yii/helpers/index.md) › Url

| class | `yii\helpers\Url` |
| --- | --- |
| Extends | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| Since | 2.0 |
| Source | [`framework/helpers/Url.php`](https://github.com/yiisoft/yii2/blob/22.0/framework/helpers/Url.php#L19) |

Url provides a set of static methods for managing URLs.

For more details and usage information on Url, see the [guide article on url helpers](/docs/guide/helper-url/index.md).

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-urlManager"></span>[`$urlManager`](/docs/api/yii/helpers/baseurl/index.md#property-urlManager) static | [`yii\web\UrlManager`](/docs/api/yii/web/urlmanager/index.md) | URL manager to use for creating URLs Default: `null`. Available since 2.0.8. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-base"></span>[`base()`](/docs/api/yii/helpers/baseurl/index.md#method-base) static | Returns the base URL of the current request. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-canonical"></span>[`canonical()`](/docs/api/yii/helpers/baseurl/index.md#method-canonical) static | Returns the canonical URL of the currently requested page. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-current"></span>[`current()`](/docs/api/yii/helpers/baseurl/index.md#method-current) static | Creates a URL by using the current route and the GET parameters. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-ensureScheme"></span>[`ensureScheme()`](/docs/api/yii/helpers/baseurl/index.md#method-ensureScheme) static | Normalize the URL by ensuring it uses specified scheme. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-home"></span>[`home()`](/docs/api/yii/helpers/baseurl/index.md#method-home) static | Returns the home URL. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-isRelative"></span>[`isRelative()`](/docs/api/yii/helpers/baseurl/index.md#method-isRelative) static | Returns a value indicating whether a URL is relative. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-previous"></span>[`previous()`](/docs/api/yii/helpers/baseurl/index.md#method-previous) static | Returns the URL previously [remembered](/docs/api/yii/helpers/baseurl/index.md#method-remember). | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-remember"></span>[`remember()`](/docs/api/yii/helpers/baseurl/index.md#method-remember) static | Remembers the specified URL so that it can be later fetched back by [`previous()`](/docs/api/yii/helpers/baseurl/index.md#method-previous). | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-to"></span>[`to()`](/docs/api/yii/helpers/baseurl/index.md#method-to) static | Creates a URL based on the given parameters. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-toRoute"></span>[`toRoute()`](/docs/api/yii/helpers/baseurl/index.md#method-toRoute) static | Creates a URL for the given route. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-getUrlManager"></span>[`getUrlManager()`](/docs/api/yii/helpers/baseurl/index.md#method-getUrlManager) protected static |  | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-normalizeRoute"></span>[`normalizeRoute()`](/docs/api/yii/helpers/baseurl/index.md#method-normalizeRoute) protected static | Normalizes route and makes it suitable for UrlManager. Absolute routes are staying as is while relative routes are converted to absolute ones. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |
| <span id="method-resolveCurrentRoute"></span>[`resolveCurrentRoute()`](/docs/api/yii/helpers/baseurl/index.md#method-resolveCurrentRoute) protected static | Resolves the route of the currently requested page. | [`BaseUrl`](/docs/api/yii/helpers/baseurl/index.md) |