3

I need help for setting up gitlab pages on my own domain. So i host my git on gitlab.com, and when i want custom domain name for pages i need to enter CNAME record on my root (with DNS editor). Problem is that i have MX records for hosting email on zoho servers. So after setting up my cname records to lead to gitlab all my emails just stop coming... Is there any other way to connect my domain name but without cname record? I read that setting up CNAME on root is bad idea for MX records, but i cant find any other way to rout my domain on gitlab pages.

NoobyAFK
  • 307
  • 4
  • 14

1 Answers1

9

If you are using a root domain, than you should add a DNS A record pointing to the IP address of GitLab Pages server:

example.com A 52.167.214.135

Now, only if you are using a subdomain, you should add a CNAME record:

subdomain.example.com CNAME namespace.gitlab.io - where namespace is your username or groupname.

Check https://about.gitlab.com/2016/04/07/gitlab-pages-setup/#custom-domains for reference.

This should do the job. Let me know how it goes, yeah? ;)


Updates:

Pages IP on GitLab.com has changed: https://about.gitlab.com/2017/03/06/we-are-changing-the-ip-of-gitlab-pages-on-gitlab-com/.

New docs on custom domains/DNS records here: https://docs.gitlab.com/ce/user/project/pages/getting_started_part_three.html

Virtua Creative
  • 2,025
  • 1
  • 13
  • 18
  • i try with that, but in that case i cant see visual content of my code. I just can see source (yea that ip from gitlab open my source code) – NoobyAFK Apr 11 '16 at 14:28
  • @NoobyAFK Sorry, I didn't understand you. Can you try to explain again? If you could give me your repo URL I could take a look at your project. Is it private? – Virtua Creative Apr 11 '16 at 14:34