0

I want to add a CNAME to my DNS to resolve www.spfweb.co.uk to spfweb.gitlab.io

In all good DNS documentation, it seems my www CNAME record should resolve to spfweb.gitlab.io. (i.e. with a trailing dot) [btw, I've not set this up yet...]

However... http://spfweb.gitlab.io/ is good and works, but http://spfweb.gitlab.io./ results in a 404

Would my CNAME record be wrong? (i.e. against good DNS advice, it would not end with a trailing dot to work), or is gitlab not checking hostname correctly? Indeed, if I make it resolve to spfweb.gitlab.io (without trailing dot), it actually resolves to spfweb.gitlab.io.spfweb.co.uk

If you look at other websites - even gitlab.com itself, http://gitlab.com./ works as expected.

So, whichever way one I use, it doesn't work: with trailing dot, gitlab returns 404. Without trailing dot, DNS is resolved incorrectly?!

Steve Folly
  • 8,327
  • 9
  • 52
  • 63
  • Trust the "good DNS documentations" and append a dot. – tkausl Oct 12 '16 at 12:52
  • @tkaust thanks, that's what I thought. But if I do that gitlab reports 404. I've done some other changes; give DNS about 6 hours to timeout, then resolve www.spfweb.co.uk - and browse to http://www.spfweb.co.uk/ to see what I mean. – Steve Folly Oct 14 '16 at 08:52
  • I just tested it locally, gitlab doesn't know about your other domain. I don't know gitlab that good, but you need to configure gitlab so it understands that `www.spfweb.co.uk` and `spfweb.gitlab.io` are the same thing. – tkausl Oct 14 '16 at 09:21
  • 1
    https://about.gitlab.com/2016/04/07/gitlab-pages-setup/#custom-domains Did you add your second domain to your gitlab project? – tkausl Oct 14 '16 at 09:25
  • @tkausl - ah - I didn't, no. I've added it now - and BOOM! Yes, it's working thank you.Interestingly, that link suggests the CNAME record should NOT have a trailing dot! Thanks – Steve Folly Oct 15 '16 at 11:32
  • @tkausl if you want, write an answer and I'll accept it – Steve Folly Oct 15 '16 at 11:33
  • @tkausl just doing a bit of house-keeping on my questions - if you're still interested writing an answer, I'll accept that. – Steve Folly Sep 23 '22 at 05:09

0 Answers0