[SOLVED] Custom "URI Match Detection" for login entries

I have a website where I have different login credentials for different sub-domains. With the current autofill implementation, I have to use “Base domain” setting so it will work.

But it often fills incorrectly login credentials from another subdomain, as it uses only “base domain” match. So for these login entries, I would like to use “Host” or another setting.

Why do you have to use base domain and not host for URI matching?

Because websites tend to change subdomains where you log in, as well as have www and no-www versions. Basically, switching to Host will disable autofill on 50-70% of my entries.

Another way it could be solved: Bitwarden will prioritize matching subdomains first if it found multiple entries for the same website. And ignoring www would be cool, but wont solve it.

You can add multiple URIs to one vault entry. Just add whichever ones you need to each entry, with the appropriate matching set for each one. The URI matching rules are flexible enough that you can configure it pretty much however you need.

Regular Expression match detection might be what you are looking for. You can customize it almost any way you can imagine. Has no effect on iOS though, as is the case with most match detection types.

Personally, for multiple subdomain logins I tend to use Starts With match detection, which works nicely with both subdomains and even different ports on each subdomain. So long as I keep the URI as simple and exact as it needs to be, it works great: i.e. http://sub.domain.com or https://sub.domain.com:8443 are both different (http vs https and no port vs port 8443).

No idea how to use Regex, and I’m web developer.
“Starts with” match wont work on 99% of my login entries. If I can use it only for 1 domain than it would work thou probably.

Could you give a typical example of the sort of subdomains you have in your vault entries? May be able to suggest the best way to handle them.

example.org - own logins for control panel (1)
sub.example.org - separate logins for access (5+)
sub2.example.org - another logins (3)
I have 2 similar websites like that where I visit very often (work related).

As @Ayitaka has suggested above, you could handle all three of these sites with Starts With match detection. Perhaps there is more complexity here than you have provided us, but I don’t see what the issue is. Please elaborate if you want help.

And just in case you aren’t doing this already, one credential (i.e., username/password combo) = 1 login item in Bitwarden. Then set the appropriate URIs and matching rules - the system is very flexible and I have never found a situation where it didn’t work (I am also in IT and work on multiple servers with multiple credentials all in one domain).

Does each of those URI’s have its own unique credentials? Or where you’ve said “5+”, do you mean there are 5 different logins for that particular site?

I’m sure either “Host” or “Starts With” match detection would work here. As @dh024 said, if there is any additional information that would help us to figure this out, that would be great.

Yes 5 logins

How to set it up?

Well, you would literally just set each URI to “Host” match detection. Have you tried that? What happens when you set it to “Host”?

literally just set each URI to “Host” match detection

When I edit login credentials entry there is no option like this.

https://bitwarden.com/help/article/uri-match-detection/

https://bitwarden.com/help/article/auto-fill-browser/

Edit an entry, then click the little cog symbol to the right of the URI:

image

This opens a match detection selection where you can choose “Host”.

Jesus, wow! So it exists!! THANKS! So you may archive or remove my idea as its already there! I would suggest opening the setting by default (as its only 1 anyway), I would never think its there! :joy:

P.S. just loged in on 2 subdomain in 1 click as it was correctly prefilled, finally!

1 Like

That’s great that this satisfies your need! I’ll mark this request as closed.

I went ahead and opened this and moved it to the user support section, just in case anyone finds it helpful later :slight_smile:

3 Likes