core5 min

Domain Detection

Learn how Copiqo automatically matches and selects workspaces based on the website you are currently viewing.

Goal

Understand the URL detection engine to configure domain matching rules so that Copiqo loads the correct workspace as you browse.

How Detection Works

Every time you change tabs or navigate to a new page, Copiqo performs the following steps: 1. Reads the current tab's active URL. 2. Compares the URL against the Domain Rules configured inside each of your workspaces. 3. Switches to and displays the workspace that contains the best matching rule.

---

Matching Types

Copiqo supports three different matching algorithms to handle various domain structures:

| Matching Mode | How It Works | Best Used For | | :--- | :--- | :--- | | Exact | The URL must match the configured hostname exactly. | When your test environments have a fixed, unchanging host name. | | Contains | Matches if the active URL contains the specified keyword. | When testing across dynamic subdomains or nested subfolders. | | Regex | Evaluates the URL using a regular expression. | Advanced routing setups with complex URL patterns. |

Configuration Examples

#### 1. Exact Matching - Rule: staging.myproject.com - Matches: https://staging.myproject.com - Excludes: https://api.staging.myproject.com or https://myproject.com

#### 2. Contains Matching - Rule: staging - Matches: https://staging.myproject.com, http://localhost/staging/login - Excludes: https://myproject.com

#### 3. Regex Matching - Rule: ^https:\/\/([a-z0-9-]+\.)?staging\.myproject\.com - Matches: https://admin.staging.myproject.com, https://checkout.staging.myproject.com

---

The "Add Current Domain" Feature

To prevent typos, Copiqo provides an Add Current Domain button inside the workspace settings panel: - Step 1: Open the target website in your browser tab. - Step 2: Open Copiqo, go to Workspace settings. - Step 3: Click Add Current Domain. Copiqo extracts the hostname of your active tab and fills it in for you.

---

Common Configuration Mistakes

Warning / Cảnh báo

Including Pathnames or Protocols Avoid entering full URLs like https://staging.myproject.com/login?redirect=true into domain rules. Keep it simple: use the hostname like staging.myproject.com to match all subpages.

Caution / Chú ý

Overly Broad Contains Rules If you configure a Contains rule with a very short word (e.g., com), the workspace will activate on all standard websites like google.com, causing unnecessary workspace switches.