Internal vs External Links


Define rules to control which links open within your app versus the device's default browser (Mobile Safari/Chrome/etc). Rules are applied in order from top to bottom.


Use this configuration to specify which URLs should be loaded internally within your app, and which should launch the user out of the app and open in their default mobile browser.

For example, you may want to have pages from a vendor hosted website used by your users to open within your app. While you may want pages on third party external sites to open in the user's mobile browser.


Our default configuration for internal/external links works well for most clients. You may also modify this set of rules as needed.

Regex matches are prioritized top to bottom, so it's best to position the most specific rules first, and the most general rules last.

Editing a Rule

  • To edit a rule, click the Edit icon on the right corner of the rule.

  • To apply a rule for a single page, select "Single Page", then add the URL of the page in the provided field.

  • To apply a rule for Multiple pages, select "Multiple Pages", then add the URL Path in the provided field.

  • To apply a rule for All pages, select "All Pages", and the regex will automatically be applied in the rule.

  • To apply a custom regex to your rule, select "Custom", then add the regex in the provided field.

  • If you want to apply a rule in your subdomains as well, toggle the "Include Subdomains" option.

To match specific links to any arbitrary domain you may add a regular expression that looks for a parameter to be defined at the end of the link. For instance, define the rule https?:\/\/.*\?external=true to open externally and add links to your site as follows

Regular expression testers

Changing rules during runtime

↔️Median JavaScript Bridge

Run the following Median JavaScript Bridge command to apply new internal/external rules:

var rulesArray = [
   "id": 1,
   "regex": "https?://maps\\.google\\.com.*",
   "internal": false
   "id": 2,
   "regex": "https?://([-\\w]+\\.)*linkedin\\.com/.*",
   "internal": false
   "id": 3,
   "regex": "https?://([-\\w]+\\.)*google\\.com/maps/search/.*",
   "internal": false

median.internalExternal.set({"rules": rulesArray});