Skip to content

Userpage repository not deploying under Gitlab Pages as expected?

Summary

GitLab does not recognize a project with the name "username.gitlab.io" as being a userpage when deploying it via Github Pages.

Steps to reproduce

  • Create a repository named username.gitlab.io.
  • Set it up with a plain HTML page project.
  • Deploy it.
  • Attempt to access it's url as https://username.gitlab.io

Example Project

https://gitlab.com/pages/plain-html is one such example.

What is the current bug behavior?

GitLab deploys the website as https://username.gitlab.io/username.gitlab.io , which not only looks ridiculous but also breaks pretty much every single GitLab Pages site set up in this manner, such as my own.

What is the expected correct behavior?

Up until recently, Gitlab would recognize the repository as being a userpage based on the name and deploy to the domain username.gitlab.io, with subfolders contained within the public folder being treated as subdomains. For example, the file public/foobar/index.html could be accessed at https://username.gitlab.io/foobar.

I can recall this behavior being around as recently as a couple weeks ago, so I can only assume this is either a bug or a sudden fundamental change in Gitlab Pages's infrastructure without any warning being sent out whatsoever.

Output of checks

This bug happens on GitLab.com

Possible fixes

I wasn't able to find the commit in question nor any discussions mentioning this issue, unfortunately.