# How to get only the domain with getAssetUrl or anything else?

**URL:** <https://forum.mautic.org/t/how-to-get-only-the-domain-with-getasseturl-or-anything-else/13827>\
**Category:** Development\
**Created:** [April 8, 2020, 9:27pm UTC](https://forum.mautic.org/t/how-to-get-only-the-domain-with-getasseturl-or-anything-else/13827 "2020-04-08T21:27:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![acremonezi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/acremonezi/32/1681_2.png) [@acremonezi](https://forum.mautic.org/u/acremonezi)\
**Post date:** [April 8, 2020, 9:27pm UTC](https://forum.mautic.org/t/how-to-get-only-the-domain-with-getasseturl-or-anything-else/13827/1 "2020-04-08T21:27:25Z")

</div>

My Mautic version is: **2.16.1**  
My PHP version is: **7.0.33-0+deb9u6**

I am using this documentation bellow to develop a custom theme.

> **[Building a Theme, Step by Step](https://www.mautic.org/building-a-theme-step-by-step)**
>
> Building your first theme
> Mautic offers a lot of flexibility when it comes to creating themes.As you learn more, you will be able to harness more and more of the benefits of custom themes.
> Follow this guide to create a theme for a landing page,...

Please, I am using **{{ getAssetUrl(null, null, null, true) }}** to get my mautic installation domain URL. It is working fine. But it show the domain like this **[http://mydomain.com/page](http://mydomain.com/page)**

My doubt is: **How can I get only [mydomain.com](http://mydomain.com) without the “https://” at the beginning and the “/page/” at the end?**

Where can I found a documentation with more functions like **getAssetUrl** that I can use for Mautic Theme develpment?

Thanks in advanced,

---

<div class="post-metadata">

**Author:** ![renzof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/renzof/32/1738_2.png) [@renzof](https://forum.mautic.org/u/renzof)\
**Post date:** [April 10, 2020, 7:31am UTC](https://forum.mautic.org/t/how-to-get-only-the-domain-with-getasseturl-or-anything-else/13827/2 "2020-04-10T07:31:48Z")

</div>

Hi

I haven’t created any themes myself, I am note site what is the reason why you need the domain only but there a conversation that might be related here

> <https://github.com/mautic/mautic/issues/7958>
>
> Steps to reproduce on a fresh Mautic intance
> Download the 'Blank' theme locally, create an assets/img folder inside of it and place...

Re docs  
I think that the themes engine is using twig so their documentation might help (also I think the getAssetUrl is an extension from symfony)

Here is what I found  
Symfony extension [https://github.com/symfony/symfony/blob/168574db2961ad693dec6ed3fe09b4278c2bcc55/src/Symfony/Bridge/Twig/Extension/AssetExtension.php](https://github.com/symfony/symfony/blob/168574db2961ad693dec6ed3fe09b4278c2bcc55/src/Symfony/Bridge/Twig/Extension/AssetExtension.php)

Twig Symfony docs

[https://twig.symfony.com/doc/2.x/](https://twig.symfony.com/doc/2.x/)

Hope this helps
