# 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="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2FpxrUkBnCK6lWnXS88Dao%2Fimage.png?alt=media&#x26;token=d0b590a7-7b60-4421-8338-ec56ce7fc040" alt=""><figcaption></figcaption></figure>

**Step 3:**&#x20;

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

<figure><img src="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2F5htBRvXv4pwG54lQz9Z0%2Fimage.png?alt=media&#x26;token=7f4fe376-6181-45d3-a34d-7830d8ce6e16" alt=""><figcaption></figcaption></figure>

**Step 4:**&#x20;

Type in your custom domain and click ✔.

<figure><img src="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2FCucnwxkawAIOpLOPI7XV%2Fimage.png?alt=media&#x26;token=cfef2fa0-3a65-4d3a-8876-04af63f9f749" 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="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2FHL16T2cPFWe6t6iV3IU3%2Fimage.png?alt=media&#x26;token=a389d736-5760-4b7d-a05c-e5de76ea98a0" 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/publish-and-management/custom-domain#id-2.-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="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2F9h27d5t6qpgtZhQfdnFK%2Fimage.png?alt=media&#x26;token=b6f5cbdf-f4c4-4e21-89fa-118fc5e45770" 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="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2FDjoemdAaSu185A9uM2yx%2Fimage.png?alt=media&#x26;token=a82fd3a1-f28a-4dab-aa48-f80819ac2f2c" 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="https://2265669569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLwLbaAsqpVb8e75DOr2k%2Fuploads%2F8yZNXrJLMG7jB7KpN54c%2Fimage.png?alt=media&#x26;token=38ed44fb-14ca-4fb4-a153-4cb714ee9346" 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)
{% endhint %}

### 5. Check for Propagation

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

***

## 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.
