diff --git a/lib/util/host-rules.spec.ts b/lib/util/host-rules.spec.ts
index 92285980617040625f3d1150fdf17f9507c638a8..fbd70ce22c62835d196a114c1fff328ac926ff50 100644
--- a/lib/util/host-rules.spec.ts
+++ b/lib/util/host-rules.spec.ts
@@ -15,7 +15,7 @@ describe(getName(), () => {
           domainName: 'github.com',
           hostName: 'api.github.com',
         })
-      ).toThrow('hostRules cannot contain both a domainName and hostName');
+      ).toThrow();
     });
     it('throws if both domainName and baseUrl', () => {
       expect(() =>
@@ -24,7 +24,7 @@ describe(getName(), () => {
           domainName: 'github.com',
           baseUrl: 'https://api.github.com',
         })
-      ).toThrow('hostRules cannot contain both a domainName and baseUrl');
+      ).toThrow();
     });
     it('throws if both hostName and baseUrl', () => {
       expect(() =>
@@ -33,7 +33,7 @@ describe(getName(), () => {
           hostName: 'api.github.com',
           baseUrl: 'https://api.github.com',
         })
-      ).toThrow('hostRules cannot contain both a hostName and baseUrl');
+      ).toThrow();
     });
     it('supports baseUrl-only', () => {
       add({
@@ -45,6 +45,9 @@ describe(getName(), () => {
     });
   });
   describe('find()', () => {
+    beforeEach(() => {
+      clear();
+    });
     it('warns and returns empty for bad search', () => {
       expect(find({ abc: 'def' } as any)).toEqual({});
     });
diff --git a/lib/util/host-rules.ts b/lib/util/host-rules.ts
index d5bbfdf265229f9f9eb30a933964ae5e75a7d5ab..20e6e1a934b28eae485ad9476d635ff920077e4e 100644
--- a/lib/util/host-rules.ts
+++ b/lib/util/host-rules.ts
@@ -7,15 +7,16 @@ import * as sanitize from './sanitize';
 
 let hostRules: HostRule[] = [];
 
+const matchFields = ['hostName', 'domainName', 'baseUrl'];
+
 export function add(params: HostRule): void {
-  if (params.domainName && params.hostName) {
-    throw new Error('hostRules cannot contain both a domainName and hostName');
-  }
-  if (params.domainName && params.baseUrl) {
-    throw new Error('hostRules cannot contain both a domainName and baseUrl');
-  }
-  if (params.hostName && params.baseUrl) {
-    throw new Error('hostRules cannot contain both a hostName and baseUrl');
+  const matchedFields = matchFields.filter((field) => params[field]);
+  if (matchedFields.length > 1) {
+    throw new Error(
+      `hostRules cannot contain more than one host-matching field. Found: [${matchedFields.join(
+        ', '
+      )}]`
+    );
   }
   const confidentialFields = ['password', 'token'];
   let resolvedHost = params.baseUrl || params.hostName || params.domainName;