> For the complete documentation index, see [llms.txt](https://docs.devhub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devhub.com/themes-and-custom-templates/advanced-examples/access-current-url.md).

# Access current URL

You can use the `absolute_url` variable in your template to get the full URL to the page you are currently on.

Example: `https://www.mydomain.com/locations/seattle/subpage/`

### Example of usage

```markup
Current page URL: {{ absolute_url }}
```

### Example using the variable in an outgoing link

```markup
<a href="/some-page/?previous_page={{ absolute_url|urlencode }}">
  Some Page
<a>
```
