Adding custom domain to Gitlab Pages
Gitlab Pages
Go to pages > New domain > add the custom domain in the example.com field
including the sub domain ( if there is one )
Example : tech-docs.campusspace.in
You will be promted to add two DNS entries, one for pointing the custom domain to the Gitlab Pages page and the other one for verification. Example:
tech-docs ALIAS campus-space.gitlab.io.
_gitlab-pages-verification-code.tech-docs TXT gitlab -pages-verification-code=ed120cd75072f4281e252bc738ce18bf
GoDaddy
Go to Dns records in the purchased domain Add the new record as per the below table
| Type | Name | Value |
|---|---|---|
| CNAME | tech-docs | domain |
| TXT | gitlab-pages-verification-code.tech-docs | gitlab-pages-verification-code=ed120cd75072f4281e252bc738ce18bf |
Note
Type A is for pointing to IP addresses. Type CNAME is for pointing to an existing domain.
After the DNS records are added, refresh the verification in Gitlab to check if its verified
Save your changes in Gitlab
Select the option to use Let's Encrypt's SSL certificates. Once the domain verification is done, Gitlab will create SSL certificates. That will take some time.