Changed external_url, how to redirect old url calls to new subdomain

How can I define a redirect rule for nginx in gitlab.rb?

Here’s my scenario:

  1. I have gitlab running well with letsencrypt certificates on:
    tracker.domainhere.com

  2. I want to move to: gitlab.domainhere.com

  3. I modified giltab.rb external_url and reconfigure successfully, now everything runs on the new domain.

Problem:
A lot of people will keep calling the old URL which now have no valid certificates and show a very ugly message.

I’m trying to add a nginx redirect from every call tracker.domain.com into gitlab.domain.com

I cannot do that directly as nginx config is managed by gitlab, any ideas how to do this in /etc/gilab/gitlab.rb

Thanks