Gitlab pages multiple domains

Grumpy

Active member
Supporter
Member
1
Jun 11, 2023
103
3
35
vietnam, Hanoi
grumpydevoloper.com
Pronouns
He/Him
Shell
  1. Bash
Editor
  1. VSCode/Code
Desktop
  1. Gnome
okey i would need some help/guide about setting multiple domains on gitlab i know it is possible since i almoust get all working, but there is 3 difrent guides how to set up dns rules on namecheap and each of those not working on multiple domains main issue get when adding second domain there aka subdomain and it needs to get verified status so if i set this one too so then it looses first domain verified status and that way it looses SSL and when those goes pages goes hidden
 
this is my structure on dns records it might be still wrong but somehow i got again verified second domain when i took cname rule ofScreenshot from 2023-06-23 04-47-41.png
 
If you have a CNAME record, you cannot have any other record with the same name (this is explicitly defined in the RFC). If the host even allows it (which it most definitely should not) weird things will happen.

Think of a CNAME as replacing X with the result of A (A being the target of the CNAME).
 
so if i take cname off then gitlabs can verify second domain that is set www, but i cant get it show yet might need SSL on there, but then comes cname how it knows where is the site if i dont have cname
so options how i can get second one since i am planning to get subdomains more
 
So, as an example ...

Code:
@  IN A  192.168.0.1  <= fine
www IN A 192.168.0.1  <= fine
hello IN CNAME  somewhere.example.com.  <= fine
hello IN A 192.168.0.2 <= RFC violation
hello IN TXT "hello world"  <= RFC violation
 
You would have to have this if you want 2 sites...
Code:
site1 IN CNAME destination1.example.com.
site2 IN CNAME destination2.example.com.

Without seeing their instructions its hard to determine what they want. Can you screenshot it.
 
The URL redirect record will point the domain to them, it is going to add A and possible AAAA records in the reply pointing to their servers, they'll do a 301 or 302 HTTP redirect to www which is a CNAME.

You cannot add a
Code:
@ IN CNAME  dest.example.com.
, that is why they do it that way.
 
that makes sense so when i first started this there must be some backend issues since it never worked so i made the version that works and pushed one domain live, but now after 6 months learning stuff and help of community it makes so much more sense and it seems to work on that way now and that way i can add as many domain/subdomains on one pagei use now 2 pages 2 projects and both will have lots of subdomains coming
 
The URL redirect record will point the domain to them, it is going to add A and possible AAAA records in the reply pointing to their servers, they'll do a 301 or 302 HTTP redirect to www which is a CNAME.

You cannot add a
Code:
@ IN CNAME  dest.example.com.
, that is why they do it that way.
can you translate this for me spend 15 minutes to reading and always lost that how i need to do and what


Thank you for contacting Namecheap Support.

According to our check, the host records for your newworldtour.net and grumpydevoloper.com domains are slightly misconfigured.

Please note that on BasicDNS/PremiumDNS if you need to create a record for a bare domain (e.g., mydomain.tld), it is needed to put @ in this field.

In case a record for any subdomain (like www.mydomain.tld or blog.mydomain.tld) should be created, put only the name of your subdomain into the Host field without mentioning the domain itself. As such, the record for www.mydomain.tld should have only www in the Host.

The Host fields for the TXT records should be updated:

for newworldtour.net domain >> from _gitlab-pages-verification-code.newworldtour.net to _gitlab-pages-verification-code

for grumpydevoloper.com domain >> from _gitlab-pages-verification-code.grumpydevoloper.com to _gitlab-pages-verification-code
 
and the mystery has solved it was always on TXT host names issue

as on up images you will see a record and cname are correct to state gitlabs ip and namespace then just making site txt as below on host and then add gitlabs verification code on the value section and it is all done i wish i could get these answeres 6 months ago, but eventually all is good now and now i can add more subdomains


Code:
_gitlab-pages-verification-code.yourdomainhere.com -> _gitlab-pages-verification-code
_gitlab-pages-verification-code.www.yourdomainhere.com -> _gitlab-pages-verification-code.www
 

About Us

  • The Linux.Chat community is a multi-platform community for general Linux® support. We provide help and support for any Linux® distribution and aim to answer any questions you might have about Linux®. Discussion about the various aspects of Linux® and Free/Open Source software is also encouraged.

    Visit our communities website at Linux.Chat.
  • Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Quick Navigation

User Menu