# Custom Domain

## Set up a custom domain step by step

**Step 1:**&#x20;

You need to register an account and purchase the [**Wegic Premium Plan**](https://wegic.ai/pricing).

**Step 2:**&#x20;

Open an website file at <https://wegic.ai/workspace>.

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

**Step 3:**&#x20;

Click **\[Publish] - \[Connect your own domain]** at the top of the page.

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

**Step 4:**&#x20;

Type in your custom domain and click ✔.

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

**Step 5:**&#x20;

Click to copy the DNS record provide by Wegic.

Then go to your domain provider dashboard, add A and CNAME records with the values provided.

<figure><img src="/files/WyE6BLdp2Rnl6p1pqYFU" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="success" %}
Here's a quick guide to help you [**add A records and CNAME records**](https://help.wegic.ai/features/custom-domain#how-to-add-a-and-cname-records).
{% endhint %}

**Step 6:**&#x20;

Once you've added the required records in your domain provider’s dashboard, return to Wegic and click **\[Connect]** in the top pop-up. **We'll start verifying.**

{% columns %}
{% column %}
✅

If the connection is successful, you’ll receive a notification.&#x20;

Then, click **\[Publish]** to update your website to your own domain.

<figure><img src="/files/N2HMRQxITZHdUPx1LwiI" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}
❌

If you see an **error message**, please correct any misconfigured records as the description in the red box

Then come back to Wegic **\[Connect]** again.

<figure><img src="/files/Ot3G9S3qxaz750vuM7jD" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}

## **Why does “Connect” still fail after the DNS record is set?**

***One possible reason is:***

Even if the DNS record is already configured correctly, **the change may not take effect immediately.**

This is because DNS updates need time to propagate, which is controlled by the record’s TTL (Time To Live).

Depending on your domain provider, **this can take a few minutes or more than 24 hours.**

Domain providers **allow you to set a shorter TTL.** After changing, remember to click **“Save Changes”.**

<img src="/files/37nQy1H0slAUntMg2DQG" alt="" data-size="original">

***Another possible reason is:***

The DNS change was not saved correctly due to an unexpected issue.

In this case, you can try deleting the existing A or CNAME record, **adding it again with the correct value**, and making sure to save the changes.

Once the propagation is complete, return to Wegic and **click “Connect” again.**
{% endhint %}

***

## How to add A and CNAME records?

To add A and CNAME records to your domain, follow these steps:

### 1. Log in to your Domain Registrar Account

Go to your domain registrar’s website and log in to your account. Examples of domain registrars include GoDaddy, Namecheap, and Google Domains.

### 2. Access the DNS Settings

Once logged in, locate the section for managing your domain. This is usually called “DNS Settings,” “DNS Management,” or “Name Server Management.”

### 3. Add an A Record

An A record maps a domain to an IP address. To add it:

**Step1.** Find the option to add a new record, usually labeled “Add Record” or “Create New Record.”

**Step2.** Select “A” as the record type.

**Step3.** Enter the desired subdomain or leave it blank for the root domain.

**Step4.** In the “Points to” field, enter the IP address (43.153.40.157) you want to associate with the domain.

**Step5.** Set the TTL (Time to Live), usually left as the default setting.

**Step6.** Save your changes.

{% hint style="info" %}
• GoDaddy : [How to Add an A Record in GoDaddy](https://www.godaddy.com/en-sg/help/add-an-a-record-19238)

• Namecheap : [How can I set up an A (address) record for my domain?](https://www.namecheap.com/support/knowledgebase/article.aspx/319/2237/how-can-i-set-up-an-a-address-record-for-my-domain/)

• 阿里云 : [怎么在阿里云后台添加一条 A 记录](https://help.aliyun.com/zh/dns/pubz-add-parsing-record?spm=a2c4g.11186623.0.i0#99bf98dab1asv)
{% endhint %}

### 4. Add a CNAME Record

A CNAME record is used to alias one domain to another. To add it:

**Step1.** Find the option to add a new record.

**Step2.** Select “CNAME” as the record type.

**Step3.** In the “Host” field, enter the subdomain you want to redirect (e.g., “www”).

**Step4.** In the “Points to” field, enter the domain you want it to point to (e.g., “bjbtxxxxxxjytq.n1.wegic.app”).

**Step5.** Set the TTL, or leave it at the default.

**Step6.** Save your changes.

{% hint style="info" %}
• GoDaddy : [How to Add an CNAME Record in GoDaddy](https://www.godaddy.com/en-sg/help/add-a-cname-record-19236)

• Namecheap : [How to Create a CNAME Record For Your Domain](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain/?hcs_request_id=4248d48d0866)

• 阿里云 : [怎么添加一条 CNAME 记录](https://help.aliyun.com/zh/ga/user-guide/add-a-cname-record-for-a-domain-name?spm=5176.21213303.J_qCOwPWspKEuWcmp8qiZNQ.12.6b722f3dImEwWX\&scm=20140722.S_help@@%E6%96%87%E6%A1%A3@@153220._.ID_help@@%E6%96%87%E6%A1%A3@@153220-RL_CNAME%E8%AE%B0%E5%BD%95-LOC_llm-OR_ser-V_4-RE_new5-P0_11#section-0yn-u29-pjp:~:text=%E7%9A%84%E5%A4%8D%E5%88%B6%E3%80%82-,%E6%AD%A5%E9%AA%A4%E4%BA%8C%EF%BC%9A%E6%B7%BB%E5%8A%A0CNAME%E8%AE%B0%E5%BD%95,-%E7%99%BB%E5%BD%95%E5%9F%9F%E5%90%8D)
{% endhint %}

### 5. Check for Propagation

DNS changes may take some time to propagate across the internet (typically up to 48 hours).

***

## DNS Field Mapping (Wegic → Providers)

Wegic provides DNS records in this format:

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Type</th><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>CNAME</td><td>www</td><td>xxxxxx.n2.wegic.app</td></tr><tr><td>A</td><td>@</td><td>43.153.40.157</td></tr></tbody></table>

### How Different Providers Map These Fields

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Provider</th><th>Type</th><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>GoDaddy</td><td>Type</td><td>Name</td><td>Value</td></tr><tr><td>Namecheap</td><td>Type</td><td>Host</td><td>Value</td></tr><tr><td>Cloudflare</td><td>Type</td><td>Name</td><td>Content</td></tr><tr><td>Hostinger</td><td>Type</td><td>Name</td><td>Content</td></tr><tr><td>Squarespace</td><td>Type</td><td>Name</td><td>Data</td></tr><tr><td>IONOS</td><td>Type</td><td>Host Name</td><td>Points to</td></tr><tr><td>Alibaba Cloud</td><td>Type</td><td>Host (主机记录)</td><td>Record Value (记录值)</td></tr><tr><td>West263</td><td>Type</td><td>Host (主机记录)</td><td>Record Value (记录值)</td></tr><tr><td>OVHcloud</td><td>Type</td><td>Subdomain</td><td>Target</td></tr><tr><td>Tucows (OpenSRS)</td><td>Type</td><td>Host Name</td><td>Value</td></tr><tr><td>Network Solutions</td><td>Type</td><td>Host</td><td>Points to</td></tr><tr><td>Nominet</td><td>Type</td><td>Name</td><td>Value</td></tr><tr><td>NameSilo</td><td>Type</td><td>Host</td><td>Value</td></tr><tr><td>Wix</td><td>Type</td><td>Host Name</td><td>Value</td></tr></tbody></table>

### If Your Provider Is NOT Listed Above

Wegic fields will still map in the same way:

* Name (Wegic) = the domain prefix\
  → usually shown as: Host / Name / Subdomain / Label
* Value (Wegic) = destination\
  → usually shown as: Value / Content / Data / Points to / Target
* Type (Wegic) = record type\
  → always: A or CNAME

### Simple Rule (Always Works)

No matter which provider you use:

* Name → Host / Subdomain / Label (the left field)
* Value → Target / Content / Points to / Data (the right field)
* Type → A or CNAME

{% hint style="info" %}

### Notes

* `@` = root domain (yourdomain.com)
* `www` = subdomain ([www.yourdomain.com](http://www.yourdomain.com))
* CNAME must always **point to a domain (e.g.xxxx.n2.wegic.app)**, not an IP address (43.153.40.157)
  {% endhint %}

***

## Errors and Solutions

#### Issue 1: A or CNAME Records Not Added Properly

* Ensure that you are selecting the correct record type
* Check the TTL (Time to Live) setting; try setting it to a lower value (like 600 seconds) for faster propagation.
* Make sure there are no conflicting records, especially with the same host or subdomain.
* After adding the records, ensure that you click “Save” or “Update” to apply changes.

#### Issue 2: DNS Resolution Shows No Results

* This means your DNS records may not be set correctly, or there could be a configuration issue. Please contact your domain registrar or hosting provider for assistance.
* If you've already confirmed with your domain provider that there's no issue with your purchased domain, please try locating and removing the following record in your domain settings:<br>

  `2a02:4780:b:1303:0:19bc:f2cf:2`

  \
  After deleting the record, it may take at least 5 minutes — or up to 24 hours — for the changes to take effect.

  *(The exact timing depends on the TTL value you set for your DNS.)*

#### Issue 3: TTL Time Set Too Long

* **Check Current TTL Setting:** A common TTL value might be set to 86400 seconds (24 hours), but it can be too long for fast changes.
* **Reduce the TTL:** Set the TTL to a lower value, such as 300 seconds (5 minutes) or 600 seconds (10 minutes). This allows DNS records to refresh more frequently.
* **How to Check your TTL (Time To Live) value**

  Third-party tools to check your TTL value: <https://mxtoolbox.com/DnsLookup.aspx>

#### Issue 4: Website Not Published or Updated

After connecting your custom domain, you must “Publish” or “Update” your website for the changes to take effect.

***

## How to resolve issues when you receive an error email

**Step1:** Log in to your Domain Registrar Account. Check if the A and CNAME records have been accidentally deleted.

**Step2:** Go to Wegic, reconfigure, and publish your website.


---

# 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.wegic.ai/features/custom-domain.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.
