> For the complete documentation index, see [llms.txt](https://docs.happ-proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.happ-proxy.com/getting-started/publish-your-docs.md).

# Add domain

### **Domain Verification**

The app compares the domain you’ve registered on the site with the one used in the subscription to avoid collisions and prevent spoofing of the domain or ProviderID. The domain is stored in our database as a SHA‑256 hash—this measure protects user data and enhances security. Learn more about SHA‑256 on [Wikipedia](https://en.wikipedia.org/wiki/SHA-2).

### **Adding a Domain**

You can add a domain in three ways:

* Via the **domain addition form** on the website
* **Automatically** when creating a limited link
* Through the **API**

***

### **Adding via API**

Send a GET request to:

```
https://api.happ-proxy.com/api/add-domain?
  provider_code={provider_code}&
  auth_key={auth_key}&
  domain_name={domain_name}&
  domain_hash={domain_hash}
```

* **domain\_name** is optional. If omitted, it will be generated automatically (using the first 10 characters of domain\_hash).

### **Example Responses**

* **Success**

  ```json
  {
    "rc": 1,
    "msg": "Ok"
  }
  ```
* **Domain Already Exists**

  ```json
  {
    "rc": 2,
    "msg": "Domain hash exists"
  }
  ```
* **Error**

  ```json
  {
    "rc": 0,
    "msg": "Error description"
  }
  ```
