Support for additional link redirector/shorteners?

There are some link redirect services that obscure the original link. I would love for Switchbar to process and act on the target link instead of the original one (like it can already with some link shorteners)

For example, in this example, the original intended link is “https://www.link.com”:

Microsoft “Safelinks” redirector link: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.link.com%2F&data=

Would it be possible for Switchbar to parse out the original URL from the “Safelinks” redirect service and act on the original URL instead of the original redirector URL?

Another example is the “Viglink” redirector service.

  1. Viglink redirector link: https://redirect.viglink.com?u=https%3A%2F%2Fwww.link.com

redirects to “https://www.link.com

Would it be possible for Switchbar to parse out the original URL from the Viglink redirect services and act on the target URL?

Additional detail:

(1) Any safelink redirector URL will have a “url” parameter with the URL-encoded URL it redirects to. The rest of the parameters are not needed in order to know the redirect URL.

For example, look at the url parameter value in this. That is the real target URL (in this case the webcatalog site)

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.webcatalog.io%2F&data=05|02|c.carrillo%40northeastern.edu|3082c57613114862788908dd38f62c3c|a8eec281aaa34daeac9b9a398b9215e7|0|0|638729352191644916|Unknown|TWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D|0|||&sdata=%2BmlwYe9pS5rjSs%2BVXFwCwQLcgGkYpHGzAR%2B0tScB3Og%3D&reserved=0

This page will take a “safelink” and decode it: https://www.o365atp.com/

Example:

Here’s another example of a big ugly safelinks redirector:

https://statics.teams.cdn.office.net/evergreen-assets/safelinks/1/atp-safelinks.html?url=https%3A%2F%2Fwww.fun.com%2F&locale=en-us&dest=https%3A%2F%2Fteams.microsoft.com%2Fapi%2Fmt%2Fpart%2Famer-02%2Fbeta%2Fatpsafelinks%2Fgeturlreputationsitev2%2F&pc=g8X%252baDSpNbIA2K68MI07AZfiI2jOfMo7mr2DQbq%252fUmx%252fY0sgw3WnJujICff5jTsjbrIvfNk000I4kcWsqnHwmRtKgT6ZWNL9DJ8copX1jDCrdNOhkYZoIjuRt52EMP3RF70qkgtbx1OGk34lqS4Z526SmDQIy31umlD56vhxNG5pJRTrEmo3TEwKhqt02lKt0s0nCmXQ138He5d5EiiqO5koH3wvP9ykikIojAmfw%252fJYqtA%252bxHIEXwlNX0h9NRcRY0dZIBvoZhWV%252f4Se%252fjwWzfMnPqBFZeGJkU7ftj%252fbTVmmeQ1IPM%252fW%252fB4keDpe3tD4koM%252f%252by9tycgcLDpwDQfLt9AH%252f3PBaRe5TDYI6jtWolqoa8MJRLsohQsS6YBmQwBCbxxv6rODSHTjxyEYxK1mBETGxWQIzwg0A9m2Lop%252fHSkimH3jfs9jAZOB5oFPE16bWGFhr9UAm9kzy4wXBECzf168WkMb43DxBoI2wgwyikKS3rN8TH0xfhk%252fN9gaH5e%252fiFqjNA%252faOoa%252bcFhDO8LWIpcOoAOixMLa9QjM18odbSgcNQ0S32W6OWGnN%252bDsqfvu2mAwptoIdcT1Ti8MjCmO7aBqM8NJRbQFzHLzE998lRnE61bdVMXWi9UGXHOtZDP62kZ133x5m5nbH75BuBqG8Bpf9ySLYTTQqOJnYHVf%252fYzv8DxVSWzFgnhsjFvK9YxU%252fjmFFXYzW94VpOK%252bR07tHqnNCduUe%252ftJV6A5oOzuF5QIqNtTc5ZcPBPYrLqII6T1yepTVDuNgbrDZukkbe2znuAjiIgicGQPFoSOy2OjuTWKt3IhFUstp%252bN3KV4sN8Z501LGRfCnW7ji2NIBU2um6lfUxA4g%252bWhaMKxkJlBzt43VUPdsWbVEcsjxyOKsUwAHK%252beWHpBj%252bPYKP7HNneH8eCwboTBETaP%252fpdo3yT35vLlbaLLKr2Zzx0MQ8R2M8u2gU62xNqMJc%252fz8zEie9K3%252fFx1GkxeFP%252bL56GtVE77hF6w0rLztAPNnvvCvny%252fc3ZOm7w5mtwGNgPC8Ij4B8Fj29E%252bn70ekcYlNY6bJXrnN5%252f40ZrsanC%252bmMQiTF%252fMWytSrUERnPfg9jAYPakKo1CMrAISGBpQ8XRVcCR3GSAF%252fgcFsdM9hR7ne9w1c0m8MBY%252b%252fqf4Sp94pW9zxg8D985wXXZSS%252bZD8MXr1yy5ERzFFc6VDqvUOy4OBzSNsE4rsZwL3gI0pfPSgcRkM6rUHy3qF3EmyBybZ%252fM5UyRZzVHpZ7Odt3zGvbXfLzKWWrEpUTYbZ8Y3ZJ%252bVWjrrUSFLuDm77rdRWauHCvWSTtBNIXCywq5jgBi3%252fSQcUqhDPjcXB4cLQ4Yh2F5p84lLVHe7ZmR%252b6TaVFJWf%252bRh7KvN0qD6Kk2%252fU%253d%3B%20expires%3DMon%2C%2028%20Apr%202025%2014%3A11%3A05%20GMT%3B%20path%3D%2F%3B%20SameSite%3DNone%3B%20secure%3B%20httponly&wau=https%3A%2F%2FNAM12.safelinks.protection.outlook.com%2FGetUrlReputation&si=1745676786667%3B1745676786667%3B19%3A510103d7-ffee-4da4-95bb-e9259f7c4dfc_c63c67ca-02b0-4d43-9c2b-616bacdc3885%40unq.gbl.spaces&sd={convId%3A%2019%3A510103d7-ffee-4da4-95bb-e9259f7c4dfc_c63c67ca-02b0-4d43-9c2b-616bacdc3885%40unq.gbl.spaces%2C%20messageId%3A%201745676786667}&ce=prod&cv=49%2F25031321018&ssid=1d1f8c79-f1a4-4780-bdea-082c552e0631&ring=general&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yNTAzMTMyMTAxOCIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ==&bg=%23f0f0f0&fg=%23242424&fg2=%239092c1

Thanks for the feedback! We’ll work to add rules for these links in the future. If you can provide a few working examples, that’d help a lot!

Here’s another example. I get these all the time, but because they all start with the same “nam…” url, the real target of the links (in this case the “theinformation” website) are obscured. But if you just parse the link and look for the ‘url’ variable, it contains the real original URL to which the “safelinks” service will redirect. That is the URL that should be used for Switchbar rule making.

Example: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Furl3396.theinformation.com%2Fls...

Thanks so much! We’ll work on this soon. The hardest part is to find all the hostnames used by Microsoft. It looks like this doc has it: Microsoft 365 URLs and IP address ranges - Microsoft 365 Enterprise | Microsoft Learn

1 Like

I second this. Desperately needed if using outlook of any kind. Maybe a regex manipulator or something, but the whole safelinks thing is really really needed.

1 Like

Microsoft Safe Links always rewrite URLs using a specific domain pattern managed by Microsoft. The rewritten URLs consistently have the format:

https://DataCenterLocation.safelinks.protection.outlook.com

where “DataCenterLocation” represents a regional identifier (for example, “nam01” for North America)

All legitimate Microsoft Safe Links will use a subdomain of safelinks.protection.outlook.com as their base domain.You will not see Safe Links with any other domain, and Safe Links protection does not use alternative top-level domains or unrelated brand names. Only variations in the subdomain (such as “nam01”, “eur02”, etc.) will precede the main protection domain.

A typical rewritten Safe Links URL might look like:

nam01.safelinks.protection.outlook.com/?url=

How’s the effort coming along to add support for additional link redirectors like Microsoft Safelinks?

Actually, we’ve added support for Microsoft Safelinks in recent updates. Could you try to see if it works?

Hi, I’m using Switchbar 27.2.0 for Windows. It does not appear to have any support for safelinks. When I click a link in Outlook, I get prompted based on the safelink rather then the real link it redirects to.

”remember this choice for nam12.safelinks.protection.outlook…”. If I choose to remember a browser, it’s going to do the same browser for all Outlook links because they are all hidden behind the safelinks redirector. That’s the problem.

I hope this is helpful info, thanks.

It was a bug! Please update to 27.3.0 and try again! It should work now.

Hi! Yes, it appears to be working for safelinks now! THANK YOU!!!

Oh, sorry to mention, I found another form of safelinks with a different URL format. It’s for when you click a link in Microsoft Teams. Looks like this. Hopefully not hard to add in the next version…

https://statics.teams.cdn.office.net/evergreen-assets/safelinks/2/atp-safelinks.html?url=https%3A%2F%2Fthe-real-link.com

I just noticed today that Switchbar has reverted to no longer parsing shortlinks. Have we lost this feature again?