> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Box Edit Custom Domains

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

<RelatedLinks
  title="REQUIRED GUIDES"
  items={[
{ label: translate("Installation"), href: "/guides/embed/ui-elements/installation", badge: "GUIDE" }
]}
/>

In order to integrate a third party web application with Box Tools, you will
need to explicitly add your application's URL. On Windows, this is achieved by
adding a registry key. On MacOS, you will need to run few terminal commands to
add and remove domains.

<Info>
  Adding domains to a safelist was added in **Box Tools version 4.5.0**.
</Info>

## Safelisting on Windows

Before starting the domain safelisting installation, please download the
required scripts from the provided `.rar`
[here](https://cloud.box.com/s/kvc9cysgq1y2yldpvciwlpt7093ho78l).

### Per User Installation

Open `Add_OpenWith_WhiteListed_Domain.reg` in a text editor.

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-1.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=6f7a27eeeed42fdb78c4739f9bb63d3a" alt="Box Tools" width="1076" height="224" data-path="images/guides/embed/ui-elements/box-tools-1.png" />
</Frame>

<Info>
  Additional entries can be added on a new line.
</Info>

Close the file (save changes), open a command prompt with admin privileges, and
navigate to the .reg file and type the following command.

```sh theme={null}
reg import "Add_OpenWith_WhiteListed_Domain.reg"
```

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-3.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=d9870315606f3b5f65c2b0665a51b5d0" alt="Box Tools" width="675" height="117" data-path="images/guides/embed/ui-elements/box-tools-3.png" />
</Frame>

### Per Machine Installation

Open the following file in a text editor:

* `x64`: `Per Machine\64 bit\Add_OpenWith_WhiteListed_Domain.reg`
* `x86`: `Per Machine\32 bit\Add_OpenWith_WhiteListed_Domain.reg`

Replace the placeholder domain with the domain you would like allow.

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-4.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=ef3f65e246b56245017d6faae9552247" alt="Box Tools" width="1080" height="222" data-path="images/guides/embed/ui-elements/box-tools-4.png" />
</Frame>

<Info>
  Additional entries may be added on a new line.
</Info>

Close the file (save changes), open a  command prompt with admin privileges, and
navigate the .reg file and type the following command:

```sh theme={null}
reg import "Add_OpenWith_WhiteListed_Domain.reg"
```

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-6.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=6b492912271ec1ab6d7b265a4290aa2f" alt="Box Tools" width="675" height="97" data-path="images/guides/embed/ui-elements/box-tools-6.png" />
</Frame>

Restart the Windows service: **Box Local Com Service** (`Box Edit.exe`) using
one of the following methods.

#### Via the command prompt

In a command prompt, enter:

* `net stop "Box Local Com Service"`
* `net start "Box Local Com Service"`

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-7.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=3fb25d9828f5aa206ff38575482d4c72" alt="Box Tools" width="677" height="342" data-path="images/guides/embed/ui-elements/box-tools-7.png" />
</Frame>

#### Via the UI

Press `Windows + R` and type `services.msc`.

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-8.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=74a3f51c8e6442ca02ed4ec267d5cde6" alt="Box Tools" width="668" height="257" data-path="images/guides/embed/ui-elements/box-tools-8.png" />
</Frame>

Restart `Box Edit.exe` by finding `Box Edit` in the system tray.

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-9.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=27f8fd3083d6fd53475e0fe5c132faea" alt="Box Tools" width="240" height="158" data-path="images/guides/embed/ui-elements/box-tools-9.png" />
</Frame>

Right click and select **Quit**.

Open `%programfiles%\Box\Box Edit` and run `Box Edit.exe`.

<Frame border>
  <img src="https://mintcdn.com/box/_tECS-SYBYV9K-kZ/images/guides/embed/ui-elements/box-tools-10.png?fit=max&auto=format&n=_tECS-SYBYV9K-kZ&q=85&s=a444551868ade118110d2972a7f92864" alt="Box Tools" width="993" height="216" data-path="images/guides/embed/ui-elements/box-tools-10.png" />
</Frame>

### Removing

* Run `Remove_ALL_OpenWith_WhiteListed_Domain.reg` to remove all domains at once
* Run `Remove_OpenWith_WhiteListed_Domain.reg` to remove specific domains. Use the instructions above to add domains to this .reg, which will remove domains.

## Safelisting on MacOS

### Steps

Download the bash script
[here](https://cloud.box.com/s/z5qhc7rts6mzrhzfx6cpxeb5ed4ve5u6).

Open the Terminal, go to the folder where the bash script was downloaded, and
add the right permissions by running this command:

```sh theme={null}
chmod u+rx OpenWith.sh
```

To **add** domains, run the following command in a terminal:

```sh theme={null}
./OpenWith.sh -a domain1 domain2 ...
```

To **remove** domains, run the following command in a terminal:

```sh theme={null}
./OpenWith.sh -r domain1 domain2 ...
```

To **clear all** domains, run the following command in a
terminal:

```sh theme={null}
./OpenWith.sh -c
```

To **list** all domains, run the following command in a terminal:

```sh theme={null}
./OpenWith.sh -l
```

### Notes

* When safelisting domains ensure you are entering the domains without the HTTP protocol (for example without `https://`) or any trailing path like `yourdomain.com/page/3`.
* All requests most come from a secure origin via HTTPS.
* Safelisting subdomains and ports is possible as the wildcard `*` is supported. For example, all subdomains could be safelisted by adding `*.yourdomain.com` to your list.

## Uninstalling

When Box Tools is uninstalled, all domains will be removed.

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("UI Elements"), href: "/guides/embed/ui-elements/index", badge: "GUIDE" }
]}
/>
