# External URL Handling

External URL Handling provides an option to handle external website URLs elegantly. You can define general rule for <mark style="color:orange;">External Website URLs</mark><mark style="color:green;">.</mark> Also, you have an option to define custom rules based on URL matching.

You have options to decide where you want to open the external website on each screens that you have created.

<figure><img src="/files/sNVNrvEJh3gn0VfMZbxh" alt=""><figcaption><p>External Website URL Handling</p></figcaption></figure>

## What are the ways to handle URLs?

There are 3 different ways to handle URLs. Let's take a look at each of them in detail.

### In the app

This option will open an URL in the current selected screen. So, user will feel the navigation in the current selected screen/tab to another screen. The back button will be enabled automatically in the navigation bar.

### App Browser

This option will open an URL in the application browser. That means, user will be still in the app but it will open the browser on top the current screen and load the URL. URL which is currently loaded in the tab screen won't be changed and stays same.&#x20;

### Mobile Browser

This option will open an URL in the default mobile browser. So, user will leave your app and gets redirected to the mobile browser application. Current tab screen of the app will stays same.&#x20;

## Custom Rule

<figure><img src="/files/BxDbg9qqsHNUoK4UdvXq" alt=""><figcaption></figcaption></figure>

Custom rule is useful when you want a specific URL that you want to handle.

For example, your website is `https://ecommercely.twinr.site` and you want to open `https://ecommercely.twinr.site/about-us` to the app browser then you can specify a custom rule for that.

Here, I have decided to open the About us page outside of the app and just for shop screen.

Another example can be, opening `https://www.facebook.com` in mobile browser for all screens. So from Any screens, if you open facebook, it will open in the mobile browser instead of in the app.

#### **URL Expression**

Enter an URL expression to match. It can be whole URL or just part of the URL. Based on your preference you can decide the expression.

#### **Match as**

Here, you can select how you want Twinr Builder to match your URL. You options to select from

* **Substring** - Match as sub part of the URL
* **Prefix** - Match expression from the start of the URL
* **Suffix** - Match expression from the end of the URL
* **Equal** - Exactly match the given expression

#### Open in

Select an option for how you want to handle that URL. You can decide to open it in current tab, in mobile browser or in app browser.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.twinr.dev/screen-customization/external-url-handling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
