Skip to content

Allow Pages root domain to be used as custom domain

Markus Legner requested to merge mlegner/gitlab:feat/allow-pages-domain into master

What does this MR do and why?

This MR allows the use of the Pages root domain (gitlab.io in the case of gitlab.com) as a custom Pages domain.

It also improves the error message and the documentation at https://docs.gitlab.com/ee/administration/pages/#dns-configuration-for-custom-domains.

It is a follow-up on !77247 (merged) and closes #350627 (closed).

🛠 with at Siemens

Screenshots or screen recordings

old new
image image

How to set up and validate locally

Assuming 127.0.0.1.nip.io as Pages root domain.

  1. Ensure that GitLab Pages and custom domains is enabled for the test instance. (Set pages.external_http to 127.0.0.1.nip.io in gitlab/config/gitlab.yml when using GDK.)
  2. Go to any project, then to Settings -> Pages -> New Domain (e.g., http://127.0.0.1:3000/root/test/pages/domains).
  3. Configure the Pages root domain (127.0.0.1.nip.io); verify that no error occurs (in contrast to before this MR).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

/cc @vshushlin @ericschurter @dcouture

Merge request reports