What do I need to do in order for my GitLab pages site (Jekyll) to be accessed under www.mydomain.com
not just mydomain.com
? I have SSL through CloudFlare.
In my DNS I have:
mydomain.com A 104.208.235.32
and CNAME points to myname.gitlab.io
, and www
points to myname.gitlab.io
Do I need to create a subdomain of www
and point those to GitLab as well? I'd like my site to be without www
in the url, but if a user types in www
they should still be able to access the site.
Your project's URL is https://gitlab.com/websites/websites.gitlab.io . Once you enable GitLab Pages for your project, your website is published under https://websites.gitlab.io . General example: On GitLab.com, a project site is always available under https://namespace.gitlab.io/project-name.
With GitLab Pages you can host your static website for free.
To publish a website with Pages, you can use any static site generator, like Gatsby, Jekyll, Hugo, Middleman, Harp, Hexo, or Brunch. You can also publish any website written directly in plain HTML, CSS, and JavaScript. Pages does not support dynamic server-side processing, for instance, as . php and .
The configurations in the question are correct, what I didn't do is add both mydomain.com
and www.mydomain.com
as domains in GitLab (Settings icon > Pages > New Domain).
GitLab then directs traffic to both www and the naked domain when both domains are listed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With