When attempting to open a hyperlink from an email in Outlook that leads to a network file, you might encounter the error message, “Something unexpected went wrong with this URL.” This guide provides a simple solution by adding the network location to Internet Explorer’s trusted sites. Additionally, you’ll learn how to adjust the security settings to not require HTTPS for these sites.
Warning: Modifying internet options security settings can expose your organization to significant cybersecurity risks. These changes might lower the defenses against malware, phishing attacks, and unauthorized access to sensitive data. Ensure that any modifications are thoroughly evaluated and understood by your IT security team.
Method 1: Add the Network Location to Trusted Sites
- Open Internet Options: Even if you don’t use Internet Explorer as your primary browser, it manages certain system-wide security settings. Click start and type “Internet Options” and you should see the link show up.
Another way to find it is to open your Control Panel and switch from View by Category to Small Icons by clicking on the drop down icon. - Navigate to the Security Tab: In the Internet Options dialog, click on the ‘Security’ tab.
- Trusted Sites: Click on the ‘Trusted sites’ icon, then press the ‘Sites’ button.
- Add the Network Location:
- If you know the server name, enter
file://servername
and click Add. - If you know the IP address, type
file://ip.address
(replaceip.address
with the actual IP such as 192.168.1.1). This method works best for NFS shares like corporate file servers.
Example:
- If you know the server name, enter
- Uncheck Require HTTPS: Before clicking ‘Close’, ensure the ‘Require server verification (https:) for all sites in this zone’ box is unchecked.
Method 2: Apply Settings Using PowerShell
To automate the process of adding a trusted site and adjusting the HTTPS requirement, use the following PowerShell script. This script is particularly useful if you need to make this change on multiple computers through an RMM tool.
# Define the network locations to add to Trusted Sites $trustedSites = @("file://myserver", "file://192.168.1.1") # Adding each site to the Trusted Sites Zone (Zone 2) foreach ($site in $trustedSites) { Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\$site" -Name http -Value 2 -Type DWORD Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\$site" -Name file -Value 2 -Type DWORD } # Disable the requirement of server verification (HTTPS) Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" -Name Flags -Value 67 -Type DWORD
How to Run the PowerShell Script
- Open PowerShell as Administrator: Right-click on the PowerShell icon and select ‘Run as administrator’.
- Execute the Script: Copy and paste the script into the PowerShell window and press Enter.
This script will add your specified network locations to the Trusted Sites list and modify the HTTPS requirement setting. After running these steps, try clicking the hyperlink again in Outlook. The error should no longer occur, allowing the network file to open as intended.