Different URL for SSH and for HTTP


I wonder if there is a possibility to have different URLs for HTTP and SSH.
For HTTP: http.domain.com
for SSH: ssh.domain.com

I’m thinking to improve my git installation response time by caching with CloudFlare and if I do that then I will need this setup, or each time change settings in git configuration.

Kind regards,
Gediminas J.

Welcome to the GitLab forum @gedOHub, and thanks for asking!

GitLab uses the same external_url to set the endpoint for requests over both HTTP and SSH. You could do using subdomains or editing /etc/hosts, but ultimately SSH and HTTP traffic to GitLab will get routed to the same endpoint (IP address).

Best advice for ensuring a performant and fast GitLab experience for HTTPS and SSH traffic is to make sure you meet or exceed the requirements outlined here:


If you meet those requirements, Redis will usually take care of caching and GitLab will “just work” and have response times with network latency as the primary limiting factor.

Let us know if you have any additional questions.


Hi again, @gedOHub!
It appears that in GitLab 12.4 and newer, you can customize project Git clone URLs for HTTP(S) and SSH.


Hope you find this helpful!

1 Like

Hello, @gitlab-greg,

Thank you for your update.
I will take a look into this options.