# is\_site\_url

Source: https://zotonic.com/docs/2263/is_site_url

URI: https://zotonic.com/id/2263

Language: en



Test if the given URL is a url for the current site.

If the current site handles requests for the hostname `example.com`, then all of the following expressions will echo `true`:

```django
{{ "https://example.com"|is_site_url }}
{{ "#foo"|is_site_url }}
{{ "/page/path"|is_site_url }}
{{ "//example.com"|is_site_url }}
```

The following will echo `false`:

```django
{{ "https://foo.test"|is_site_url }}
{{ "example.com"|is_site_url }}
{{ "//foo.test"|is_site_url }}
```

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2263?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2263?language=en>)
