How do I link my domain to GitLab Pages?

This guide will help you link a Namecheap-registered domain to a GitLab Pages account in just a few clicks.

If your domain is pointed to our  BasicDNS, PremiumDNS or FreeDNS, this article is for you. If your domain is using other nameservers, you must make changes on the side of your hosting/DNS provider.

To connect your domain to GitLab Pages, follow these steps:

1. Sign in to your Namecheap account.

2. Select Domain List from the left navigation sidebar and click on the Manage button that appears in front of your domain name:


3. Now click on the Advanced DNS tab and locate the Host Records section. Use the Add New Record button to add the required records. If you are unable to edit your Host Records, please read our helpful article on how to modify your host records.


Here you will need to create several records for your domain:

  • A record for @ pointing to 35.185.44.232
  • CNAME record for www pointing to namespace.gitlab.io
  • TXT records for _gitlab-pages-verification-code and _gitlab-pages-verification-code.www pointing to unique strings that begin with "gitlab-pages-verification-code=" (can be checked in your GitLab account)

Once all the details have been entered, save them using the Save All Changes green button:


NOTE
: The 35.185.44.232 IP address is used only for projects on GitLab.com. For projects living in other GitLab instances (CE or EE), use the server’s IP address on which your instance is running.

Usually, it takes 30 minutes for newly-created records to take effect.

4. Ensure that there are no conflicting records set for the same host and remove them if there are any. The records you need to check may be URL Redirect (Unmasked/Masked/Permanent Redirect), A or CNAME record types.

Here is an example of the conflicting records:

If you have any questions, feel free to contact our Support Team.
Updated
Viewed
12564 times

Need help? We're always here for you.

notmyip