We used to operate our local GitLab instance with a self-signed certificate at https://gitlab (where gitlab was the hostname of the server), which was accessible from our internal network.
Due to a new requirement to make the instance accessible from our external servers (and to get rid of the occasional issues that come with the self-signed certificate), we wanted to migrate from https://gitlab to https://gitlab.example.com.
Basically this worked easily by changing the external_url accordingly and gitlab-ctl reconfigure && gitlab-ctl restart.
However this broke old links starting with https://gitlab/..., because GitLab presented the new certificate for gitlab.example.com, which was of course refused by the browser.
Replace gitlab.example.com with your new domain or hostname.
Save and reconfigure GitLab to apply the changes: sudo gitlab-ctl reconfigure
Now old URLs starting with https://gitlab/... will be redirected to the new https://gitlab.example.com/... URLs.