diff --git a/lib/config/presets/gitlab/index.spec.ts b/lib/config/presets/gitlab/index.spec.ts
index ab8b55db7219776a026f2d135fb5844a118f59bd..e6bf9f67c4505c7c5b3d71b1b64a84aa4c86b9f5 100644
--- a/lib/config/presets/gitlab/index.spec.ts
+++ b/lib/config/presets/gitlab/index.spec.ts
@@ -4,7 +4,8 @@ import { PRESET_DEP_NOT_FOUND } from '../util';
 import * as gitlab from '.';
 
 const gitlabApiHost = 'https://gitlab.com';
-const basePath = '/api/v4/projects/some%2Frepo/repository';
+const projectPath = '/api/v4/projects/some%2Frepo';
+const basePath = `${projectPath}/repository`;
 
 describe('config/presets/gitlab/index', () => {
   beforeEach(() => {
@@ -13,7 +14,7 @@ describe('config/presets/gitlab/index', () => {
 
   describe('getPreset()', () => {
     it('throws EXTERNAL_HOST_ERROR', async () => {
-      httpMock.scope(gitlabApiHost).get(`${basePath}/branches`).reply(500);
+      httpMock.scope(gitlabApiHost).get(projectPath).reply(500);
       await expect(
         gitlab.getPreset({
           repo: 'some/repo',
@@ -22,12 +23,22 @@ describe('config/presets/gitlab/index', () => {
       ).rejects.toThrow(EXTERNAL_HOST_ERROR);
     });
 
+    it('throws if project could not be found', async () => {
+      httpMock.scope(gitlabApiHost).get(projectPath).reply(404);
+      await expect(
+        gitlab.getPreset({
+          repo: 'some/repo',
+          presetName: 'non-default',
+        })
+      ).rejects.toThrow(PRESET_DEP_NOT_FOUND);
+    });
+
     it('throws if missing', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
+        .get(projectPath)
         .twice()
-        .reply(200, [])
+        .reply(200, {})
         .get(`${basePath}/files/default.json/raw?ref=master`)
         .reply(404)
         .get(`${basePath}/files/renovate.json/raw?ref=master`)
@@ -40,16 +51,10 @@ describe('config/presets/gitlab/index', () => {
     it('should return the preset', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'main',
-            default: true,
-          },
-          {
-            name: 'master',
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'main',
+        })
         .get(`${basePath}/files/default.json/raw?ref=main`)
         .reply(200, { foo: 'bar' }, {});
 
@@ -73,16 +78,10 @@ describe('config/presets/gitlab/index', () => {
     it('should query custom paths', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'devel',
-          },
-          {
-            name: 'master',
-            default: true,
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'master',
+        })
         .get(`${basePath}/files/path%2Fcustom.json/raw?ref=master`)
         .reply(200, { foo: 'bar' }, {});
 
@@ -97,16 +96,10 @@ describe('config/presets/gitlab/index', () => {
     it('should query custom paths with .json extension', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'devel',
-          },
-          {
-            name: 'master',
-            default: true,
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'master',
+        })
         .get(`${basePath}/files/path%2Fcustom.json/raw?ref=master`)
         .reply(200, { foo: 'bar' }, {});
 
@@ -121,16 +114,10 @@ describe('config/presets/gitlab/index', () => {
     it('should query custom paths with .json5 extension', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'devel',
-          },
-          {
-            name: 'master',
-            default: true,
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'master',
+        })
         .get(`${basePath}/files/path%2Fcustom.json5/raw?ref=master`)
         .reply(200, { foo: 'bar' }, {});
 
@@ -147,13 +134,10 @@ describe('config/presets/gitlab/index', () => {
     it('uses default endpoint', async () => {
       httpMock
         .scope(gitlabApiHost)
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'devel',
-            default: true,
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'devel',
+        })
         .get(`${basePath}/files/some.json/raw?ref=devel`)
         .reply(200, { preset: { file: {} } });
       expect(
@@ -168,13 +152,10 @@ describe('config/presets/gitlab/index', () => {
     it('uses custom endpoint', async () => {
       httpMock
         .scope('https://gitlab.example.org')
-        .get(`${basePath}/branches`)
-        .reply(200, [
-          {
-            name: 'devel',
-            default: true,
-          },
-        ])
+        .get(projectPath)
+        .reply(200, {
+          default_branch: 'devel',
+        })
         .get(`${basePath}/files/some.json/raw?ref=devel`)
         .reply(404);
       await expect(
diff --git a/lib/config/presets/gitlab/index.ts b/lib/config/presets/gitlab/index.ts
index edf601a9c2b42e7f48326b238550d82e60a93334..5c2902fc02796ff2776895e955e7606c47e0c425 100644
--- a/lib/config/presets/gitlab/index.ts
+++ b/lib/config/presets/gitlab/index.ts
@@ -1,7 +1,7 @@
 import is from '@sindresorhus/is';
 import { logger } from '../../../logger';
 import { ExternalHostError } from '../../../types/errors/external-host-error';
-import type { GitLabBranch } from '../../../types/platform/gitlab';
+import type { GitlabProject } from '../../../types/platform/gitlab';
 import { GitlabHttp } from '../../../util/http/gitlab';
 import type { HttpResponse } from '../../../util/http/types';
 import type { Preset, PresetConfig } from '../types';
@@ -14,19 +14,10 @@ async function getDefaultBranchName(
   urlEncodedPkgName: string,
   endpoint: string
 ): Promise<string> {
-  const branchesUrl = `${endpoint}projects/${urlEncodedPkgName}/repository/branches`;
-
-  const res = await gitlabApi.getJson<GitLabBranch[]>(branchesUrl);
-  const branches = res.body;
-  let defaultBranchName = 'master';
-  for (const branch of branches) {
-    if (branch.default) {
-      defaultBranchName = branch.name;
-      break;
-    }
-  }
-
-  return defaultBranchName;
+  const res = await gitlabApi.getJson<GitlabProject>(
+    `${endpoint}projects/${urlEncodedPkgName}`
+  );
+  return res.body.default_branch ?? 'master'; // should never happen, but we keep this to ensure the current behavior
 }
 
 export async function fetchJSONFile(
diff --git a/lib/types/platform/gitlab/index.ts b/lib/types/platform/gitlab/index.ts
index 575cf34d22e68e7764a9eebf413192973d709871..d09a10cadb4a69952759877a6d00417e95fb7ba5 100644
--- a/lib/types/platform/gitlab/index.ts
+++ b/lib/types/platform/gitlab/index.ts
@@ -12,3 +12,10 @@ export type GitlabTreeNode = {
   id: string;
   name: string;
 } & GitTreeNode;
+
+/**
+ * https://docs.gitlab.com/ee/api/projects.html#get-single-project
+ */
+export interface GitlabProject {
+  default_branch: string;
+}