Pages will not work with usernames, groups or projects that end in a -, contain dots, or are otherwise not valid domain labels
ZD: https://gitlab.zendesk.com/agent/tickets/84980
From the user:
>was trying to setup a project with pages and found that my username would actually would not be accepted as valid syntax for a domain name in the browser
>user--.gitlab.io
>By coincidence I was recently implementing RFC 883 for domain name label syntax so I quickly realised that you cannot have a domain label that starts or ends with a dash. Furthermore you can only have the characters (a-z, 0-9, -) so any username with underscore will have issues too.
I don't know if this is handled by GitLab itself or the pages daemon (or both in conjunction). Reporting here for now.
## Known limitations
This is a [known limitation of GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/introduction.html#limitations) and they way [SSL certificates work](https://tools.ietf.org/html/rfc2818#section-3.1).
> When using Pages under the general domain of a GitLab instance (*.example.io), you cannot use HTTPS with sub-subdomains. That means that if your username or group name contains a dot, for example foo.bar, the domain https://foo.bar.example.io does not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages continue to work provided you don’t redirect HTTP to HTTPS.
There is a follow-up issue to [display a warning during namespace/username creation](https://gitlab.com/gitlab-org/gitlab/-/issues/299285)
## Workaround
Enable unique domain for your project. Please refer docs on [how to enable unique domains](https://docs.gitlab.com/ee/user/project/pages/introduction.html#enable-unique-domains).
issue