# Custom Domain Github Pages

1. **Pada repositori Github, klik Settings**

<figure><img src="/files/1lkVlxyeLkruf02xeL2q" alt=""><figcaption></figcaption></figure>

2. **Pilih "Pages" pada tab sebelah kiri. Lalu pilih branch dan klik "Save".**

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

3. **Setelah itu isi custom domain yang diinginkan, lalu klik "Save".**

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

Memang hasilnya akan Invalid karena kita belum menambahkan record.

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

4. **Pergi ke Control Panel Domain, disini saya menggunakan Cloudflare.**

Buat A record, pada kolom "Name" beri subdomain custom tadi (gh2), jika hanya menggunakan domain maka biarkan kosong atau isi dengan (@). Lalu tambahkan value dibawah:

`185.199.108.153`\
`185.199.109.153`\
`185.199.110.153`\
`185.199.111.153`

Jangan lupa untuk mematikan Proxy nya lalu atur TTL 1 min.

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

Hasilnya seperti dibawah

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

5. **Jika sudah menambahkan record, tunggu beberapa menit. Lalu coba akses custom domainnya.**

Berikut hasilnya:

<figure><img src="/files/2HIe7f3CEWzrsT5Kucog" alt=""><figcaption></figcaption></figure>

Jika muncul seperti dibawah, abaikan saja selama website masih bisa diakses. Karena kita menggunakan A record bukan CNAME record.

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

6. **Karena website kita masih belum ada ssl nya (belum HTTPS), kita bisa menambahkan ssl secara gratis.**&#x20;

Setelah menunggu -+ 24 jam setelah website sudah berhasil diakses, maka fitur "Enforce HTTPS" akan terbuka dan centang saja.

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

7. **Jika sudah tercentang, maka website otomatis sudah berstatus "Secure" atau sudah HTTPS.**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.devops.my.id/cloud-computing/custom-domain-github-pages.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.
